Your IP : 18.221.161.43


Current Path : /opt/alt/python35/lib64/python3.5/multiprocessing/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/multiprocessing/__pycache__/popen_fork.cpython-35.opt-1.pyc



��Yf	�@sWddlZddlZddlZddlmZdgZGdd�de�ZdS)�N�)�util�Popenc@sgeZdZdZdd�Zdd�Zejdd�Zdd	d
�Z	dd�Z
d
d�ZdS)r�forkcCs4tjj�tjj�d|_|j|�dS)N)�sys�stdout�flush�stderr�
returncode�_launch)�self�process_obj�r�?/opt/alt/python35/lib64/python3.5/multiprocessing/popen_fork.py�__init__s

	zPopen.__init__cCs|S)Nr)r�fdrrr�duplicate_for_childszPopen.duplicate_for_childcCs�|jdkr�xPytj|j|�\}}Wn)tk
r\}z	dSWYdd}~XqXPqW||jkr�tj|�r�tj|�|_ntj|�|_|jS)N)r
�os�waitpid�pid�OSError�WIFSIGNALED�WTERMSIG�WEXITSTATUS)rZflagr�sts�errr�pollsz
Popen.pollNcCsm|jdkrf|dk	rDddlm}||jg|�sDdS|j|dkr_tjnd�S|jS)Nr)�waitg)r
Zmultiprocessing.connectionr�sentinelrr�WNOHANG)r�timeoutrrrrr,s"z
Popen.waitcCsn|jdkrjytj|jtj�Wn>tk
r=Yn-tk
ri|jdd�dkre�YnXdS)Nr g�������?)	r
r�killr�signal�SIGTERM�ProcessLookupErrorrr)rrrr�	terminate6s

zPopen.terminatecCs�d}tj�\}}tj�|_|jdkr�zBtj|�dtjkrkddl}|j�|j	�}Wdtj
|�Xn/tj|�tj|tj|f�||_
dS)Nrr�random)r�piperr�closer�modulesr&Zseed�
_bootstrap�_exitrZFinalizer)rr
�codeZparent_rZchild_wr&rrrr@s


z
Popen._launch)�__name__�
__module__�__qualname__�methodrrrrrrr%rrrrrr
s

)rrr"�r�__all__�objectrrrrr�<module>s
	

?>