Your IP : 3.17.76.163


Current Path : /opt/alt/python38/lib64/python3.8/multiprocessing/__pycache__/
Upload File :
Current File : //opt/alt/python38/lib64/python3.8/multiprocessing/__pycache__/popen_forkserver.cpython-38.pyc

U

i�f��@s�ddlZddlZddlmZmZejs.ed��ddlmZddlm	Z	ddlm
Z
ddlmZd	gZGd
d�de
�ZGdd	�d	e	j�ZdS)
�N�)�	reduction�set_spawning_popenz,No support for sending fds between processes)�
forkserver)�
popen_fork)�spawn)�util�Popenc@seZdZdd�Zdd�ZdS)�_DupFdcCs
||_dS�N)�ind)�selfr�r�E/opt/alt/python38/lib64/python3.8/multiprocessing/popen_forkserver.py�__init__sz_DupFd.__init__cCst��|jSr)rZget_inherited_fdsr)r
rrr�detachsz
_DupFd.detachN)�__name__�
__module__�__qualname__rrrrrrr
sr
csBeZdZdZeZ�fdd�Zdd�Zdd�Ze	j
fdd	�Z�ZS)
r	rcsg|_t��|�dSr)�_fds�superr)r
�process_obj��	__class__rrr!szPopen.__init__cCs|j�|�t|j�dS)Nr)r�append�len)r
�fdrrr�duplicate_for_child%szPopen.duplicate_for_childc	Cs�t�|j�}t��}t|�zt�||�t�||�W5td�Xt�	|j
�\|_}t�
|�}t�|tj||jf�|_t|ddd��}|�|���W5QRXt�|j�|_dS)N�wbT)�closefd)rZget_preparation_data�_name�io�BytesIOrr�dumprZconnect_to_new_processr�sentinel�os�duprZFinalizeZ	close_fds�	finalizer�open�write�	getbuffer�read_signed�pid)r
rZ	prep_dataZbuf�wZ	_parent_w�frrr�_launch)s


�z
Popen._launchc	Csr|jdkrlddlm}|tjkr$dnd}||jg|�s:dSzt�|j�|_Wntt	fk
rjd|_YnX|jS)Nr)�wait�)
�
returncodeZmultiprocessing.connectionr0r%�WNOHANGr$rr+�OSError�EOFError)r
�flagr0Ztimeoutrrr�poll=s
z
Popen.poll)
rrr�methodr
ZDupFdrrr/r%r3r7�
__classcell__rrrrr	s)r!r%�contextrrZHAVE_SEND_HANDLE�ImportError�rrrr�__all__�objectr
r	rrrr�<module>s

?>