Your IP : 3.142.251.204


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-2.pyc



���]	�@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/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�flagr�sts�errr�pollsz
Popen.pollNcCsm|jdkrf|dk	rDddlm}||jg|�sDdS|j|dkr_tjnd�S|jS)Nr)�waitg)r
�multiprocessing.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(�seed�
_bootstrap�_exitr�Finalizer )rr
�codeZparent_rZchild_wr(rrrr@s


z
Popen._launch)�__name__�
__module__�__qualname__�methodrrrr!rrr'rrrrrr
s

)rrr$�r�__all__�objectrrrrr�<module>s
	

?>