File: //lib64/python3.6/multiprocessing/__pycache__/popen_forkserver.cpython-36.opt-1.pyc
3
\ @ s d dl Z d dlZddlmZmZ ejs.edddlmZ ddlm Z ddlm
Z
ddlmZ d gZG d
d de
ZG dd d e jZdS )
N ) reductionset_spawning_popenz,No support for sending fds between processes)
forkserver)
popen_fork)spawn)utilPopenc @ s e Zd Zdd Zdd ZdS )_DupFdc C s
|| _ d S )N)ind)selfr r
8/usr/lib64/python3.6/multiprocessing/popen_forkserver.py__init__ s z_DupFd.__init__c C s t j | j S )N)r Zget_inherited_fdsr )r r
r
r detach s z
_DupFd.detachN)__name__
__module____qualname__r r r
r
r
r r
s r
c sB e Zd ZdZeZ fddZdd Zdd Ze j
fdd Z ZS )
r r c s g | _ t j| d S )N)_fdssuperr )r process_obj) __class__r
r r ! s zPopen.__init__c C s | j j| t| j d S )Nr )r appendlen)r fdr
r
r duplicate_for_child% s zPopen.duplicate_for_childc C s t j|j}tj }t| ztj|| tj|| W d td X tj | j
\| _}tj
| tj| jf t|ddd}|j|j W d Q R X tj| j| _d S )NwbT)closefd)r Zget_preparation_data_nameioBytesIOr r dumpr Zconnect_to_new_processr sentinelr ZFinalizeoscloseopenwrite getbuffer
read_unsignedpid)r r Z prep_dataZbufwfr
r
r _launch) s
z
Popen._launchc C sr | j d krlddlm} |tjkr$dnd }|| jg|s:d S ytj| j| _ W n tt fk
rj d| _ Y nX | j S )Nr )wait )
returncodeZmultiprocessing.connectionr- r# WNOHANGr"