a XC?hI ã @ s6 d dl Z d dlZddlmZ dgZG dd„ deƒZdS )é Né )ÚutilÚPopenc @ s` e Zd ZdZdd„ Zdd„ Zejfdd„Zdd d „Z dd„ Z d d„ Zdd„ Zdd„ Z dd„ ZdS )r Úforkc C s" t ¡ d | _d | _| |¡ d S ©N)r Z_flush_std_streamsÚ returncodeÚ finalizerÚ_launch)ÚselfÚprocess_obj© r ú?/opt/alt/python39/lib64/python3.9/multiprocessing/popen_fork.pyÚ__init__ s zPopen.__init__c C s |S r r )r Úfdr r r Úduplicate_for_child s zPopen.duplicate_for_childc C sR | j d u rLzt | j|¡\}}W n ty4 Y d S 0 || jkrLt |¡| _ | j S r )r ÚosÚwaitpidÚpidÚOSErrorÚwaitstatus_to_exitcode)r Úflagr Ústsr r r Úpoll s z Popen.pollNc C sN | j d u rH|d ur0ddlm} || jg|ƒs0d S | |dkrBtjnd¡S | j S )Nr )Úwaitg )r Zmultiprocessing.connectionr Úsentinelr r ÚWNOHANG)r Útimeoutr r r r r $ s z Popen.waitc C sV | j d u rRzt | j|¡ W n4 ty. Y n$ tyP | jddd u rL‚ Y n0 d S )Ngš™™™™™¹?)r )r r Úkillr ÚProcessLookupErrorr r )r Zsigr r r Ú_send_signal. s zPopen._send_signalc C s | tj¡ d S r )r ÚsignalÚSIGTERM©r r r r Ú terminate8 s zPopen.terminatec C s | tj¡ d S r )r r ÚSIGKILLr" r r r r ; s z Popen.killc C s¢ d}t ¡ \}}t ¡ \}}t ¡ | _| jdkrnz.t |¡ t |¡ |j|d}W t |¡ qžt |¡ 0 n0t |¡ t |¡ t | tj ||f¡| _ || _d S )Nr r )Zparent_sentinel)r Úpiper r ÚcloseÚ _bootstrapÚ_exitr ZFinalizeZ close_fdsr r )r r ÚcodeZparent_rZchild_wZchild_rZparent_wr r r r > s ÿz Popen._launchc C s | j d ur| ¡ d S r )r r" r r r r&