Your IP : 3.148.104.103


Current Path : /usr/lib64/python3.6/multiprocessing/__pycache__/
Upload File :
Current File : //usr/lib64/python3.6/multiprocessing/__pycache__/popen_spawn_win32.cpython-36.opt-2.pyc

3


 \��@s�ddlZddlZddlZddlZddlZddlmZmZmZddl	m
Z
ddl	mZdgZdZ
ejdkoreed	d
�Zejj�jd�ZGdd�de�ZdS)
�N�)�	reduction�get_spawning_popen�set_spawning_popen)�spawn)�util�PopeniZwin32�frozenFzpythonservice.exec@s:eZdZdZdd�Zdd�Zd
dd�Zd	d
�Zdd�ZdS)rrcCstj|j�}tjdd�\}}tj|d�}tjtj	�|d�}dj
dd�|D��}t|ddd���}y4tjtj
�|ddd	dddd�	\}}	}
}tj|	�Wntj|��YnX|
|_d|_||_t|�|_tj|tj|jf�t|�ztj||�tj||�Wdtd�XWdQRXdS)
Nr)Z
parent_pidZpipe_handle� css|]}d|VqdS)z"%s"N�)�.0�xrr�9/usr/lib64/python3.6/multiprocessing/popen_spawn_win32.py�	<genexpr>)sz!Popen.__init__.<locals>.<genexpr>�wbT)�closefdF)rZget_preparation_data�_name�_winapiZ
CreatePipe�msvcrtZopen_osfhandleZget_command_line�os�getpid�join�openZ
CreateProcessZget_executableZCloseHandle�pid�
returncode�_handle�int�sentinelrZFinalizerr�dump)�selfZprocess_objZ	prep_dataZrhandleZwhandleZwfd�cmdZto_childZhpZhtr�tidrrr�__init__ s2


zPopen.__init__cCstj||j�S)N)rZ	duplicater)rZhandlerrr�duplicate_for_childEszPopen.duplicate_for_childNcCst|jdkrn|dkrtj}ntdt|dd��}tjt|j�|�}|tjkrntj|j�}|t	krht
j}||_|jS)Nri�g�?)rrZINFINITE�maxrZWaitForSingleObjectrZ
WAIT_OBJECT_0ZGetExitCodeProcess�	TERMINATE�signal�SIGTERM)r�timeoutZmsecs�res�coderrr�waitIs

z
Popen.waitcCs|jdd�S)Nr)r()r+)rrrr�pollYsz
Popen.pollcCsL|jdkrHytjt|j�t�Wn&tk
rF|jdd�dkrB�YnXdS)Ng�?)r()rrZTerminateProcessrrr%�OSErrorr+)rrrr�	terminate\s
zPopen.terminate)N)	�__name__�
__module__�__qualname__�methodr"r#r+r,r.rrrrrs%
)rrr&�sysr�contextrrr�rr�__all__r%�platform�getattrZWINEXE�
executable�lower�endswithZ
WINSERVICE�objectrrrrr�<module>s

?>