AlkantarClanX12

Your IP : 18.225.149.158


Current Path : /opt/alt/python310/lib64/python3.10/multiprocessing/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/multiprocessing/__pycache__/popen_forkserver.cpython-310.pyc

o

6��f��@s�ddlZddlZddlmZmZejsed��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�G/opt/alt/python310/lib64/python3.10/multiprocessing/popen_forkserver.py�__init__s
z_DupFd.__init__cCst��|jSr)rZget_inherited_fdsr)r
rrr�detachsz
_DupFd.detachN)�__name__�
__module__�__qualname__rrrrrrr
sr
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_childcCs�t�|j�}t��}t|�zt�||�t�||�Wtd�ntd�wt�	|j
�\|_}t�
|�}t�|tj||jf�|_t|ddd��}|�|���Wd�n1sYwYt�|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	Csx|jdur9ddlm}|tjkrdnd}||jg|�sdSzt�|j�|_W|jStt	fy8d|_Y|jSw|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