Your IP : 3.145.85.123
�
e ft � @ sc d d l Z d d l Z d d l Z d d l Z d d l m Z d g Z Gd d � d e � Z d S)� N� )�util�Popenc @ sg e Z d Z d Z d d � Z d d � Z e j d d � Z d d d
� Z d d � Z
d
d � Z d S)r �forkc C s4 t j j � t j j � d | _ | j | � d S)N)�sys�stdout�flush�stderr�
returncode�_launch)�self�process_obj� r �?/opt/alt/python34/lib64/python3.4/multiprocessing/popen_fork.py�__init__ s
zPopen.__init__c C s | S)Nr )r �fdr r r �duplicate_for_child s zPopen.duplicate_for_childc C s� | j d k r� xh y t j | j | � \ } } WnA t k
rt } z! | j t j k r^ w n d SWYd d } ~ Xq XPq W| | j k r� t j | � r� t j | � | _ q� t j | � | _ q� n | j S)N)
r
�os�waitpid�pid�OSError�errnoZEINTR�WIFSIGNALED�WTERMSIG�WEXITSTATUS)r Zflagr �sts�er r r �poll s z
Popen.pollNc C sp | j d k ri | d k rG d d l m } | | j g | � sG d Sn | j | d k rb t j n d � S| j S)Nr )�waitg )r
Zmultiprocessing.connectionr �sentinelr r �WNOHANG)r �timeoutr r r r r / s "z
Popen.waitc C st | j d k rp y t j | j t j � Wqp t k
r= Yqp t k
rl | j d d � d k rh � n Yqp Xn d S)Nr! g�������?) r
r �killr �signal�SIGTERM�ProcessLookupErrorr r )r r r r � terminate9 s
zPopen.terminatec C s� d } t j � \ } } t j � | _ | j d k r� zE t j | � d t j k rn d d l } | j � n | j � } Wd t j
| � Xn/ t j | � t j | t j | f � | | _
d S)Nr r �random)r �piper r �closer �modulesr'