AlkantarClanX12

Your IP : 13.58.18.135


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

3

� f��@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>eZdZdZdZdd�Zdd�Zddd	�Zd
d�Zdd
�Z	dS)rz@
    Start a subprocess to run the code of a process object
    rc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�F/opt/alt/python36/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__cCs|t�kst�tj||j�S)N)r�AssertionErrorrZ	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__�__doc__�methodr"r$r,r-r/rrrrrs%
)rrr'�sysr�contextrrr�rr�__all__r&�platform�getattrZWINEXE�
executable�lower�endswithZ
WINSERVICE�objectrrrrr�<module>s