%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /snap/core20/2379/lib/python3.8/multiprocessing/__pycache__/
Upload File :
Create Path :
Current File : //snap/core20/2379/lib/python3.8/multiprocessing/__pycache__/popen_spawn_win32.cpython-38.pyc

U

k�]e��@s�ddlZddlZddlZddlZddlZddlmZmZmZddl	m
Z
ddl	mZdgZdZ
ejdkoreed	d
�Zej���d�Zdd
�Zeejej�Zdd�ZGdd�de�ZdS)�N�)�	reduction�get_spawning_popen�set_spawning_popen)�spawn)�util�PopeniZwin32�frozenFzpythonservice.execCs ||kptj�|�tj�|�kS�N)�os�path�normcase)Zp1Zp2�r�7/usr/lib/python3.8/multiprocessing/popen_spawn_win32.py�_path_eqsrcGs|D]}t�|�qdSr
)�_winapi�CloseHandle)Zhandles�handlerrr�_close_handlessrc@sJeZdZdZdZdd�Zdd�Zddd	�Zd
d�Zdd
�Z	e	Z
dd�ZdS)rz@
    Start a subprocess to run the code of a process object
    rcCsTt�|j�}t�dd�\}}t�|d�}tjt�	�|d�}d�
dd�|D��}t��}tr�t
|tj�r�tj}tj��}tj|d<nd}t|ddd	���}	z0t�||ddd
d|dd�	\}
}}}
t�|�Wnt�|��YnX||_d|_|
|_t|
�|_t�|t|jt|�f�|_t|�zt �!||	�t �!||	�W5td�XW5QRXdS)Nr)Z
parent_pidZpipe_handle� css|]}d|VqdS)z"%s"Nr)�.0�xrrr�	<genexpr>9sz!Popen.__init__.<locals>.<genexpr>Z__PYVENV_LAUNCHER__�wbT)�closefdF)"rZget_preparation_data�_namerZ
CreatePipe�msvcrtZopen_osfhandleZget_command_liner�getpid�joinZget_executable�WINENVr�sys�
executable�_base_executable�environ�copy�openZ
CreateProcessr�pid�
returncode�_handle�int�sentinelrZFinalizer�	finalizerrr�dump)�selfZprocess_objZ	prep_dataZrhandleZwhandleZwfd�cmdZ
python_exe�envZto_childZhpZhtr&�tidrrr�__init__,sT
�
�

�zPopen.__init__cCs|t�kst�t�||j�Sr
)r�AssertionErrorrZ	duplicater*)r-rrrr�duplicate_for_childaszPopen.duplicate_for_childNcCst|jdkrn|dkrtj}ntdt|dd��}t�t|j�|�}|tjkrnt�|j�}|t	krht
j}||_|jS)Nri�g�?)r'rZINFINITE�maxr)ZWaitForSingleObjectr(Z
WAIT_OBJECT_0ZGetExitCodeProcess�	TERMINATE�signal�SIGTERM)r-�timeoutZmsecs�res�coderrr�waites

z
Popen.waitcCs|jdd�S)Nr�r8)r;�r-rrr�pollusz
Popen.pollcCsL|jdkrHzt�t|j�t�Wn&tk
rF|jdd�dkrB�YnXdS)Ng�?r<)r'rZTerminateProcessr)r(r5�OSErrorr;r=rrr�	terminatexs
zPopen.terminatecCs|��dSr
)r+r=rrr�close�szPopen.close)N)�__name__�
__module__�__qualname__�__doc__�methodr1r3r;r>r@�killrArrrrr&s5
)rrr6r r�contextrrr�rr�__all__r5�platform�getattrZWINEXEr!�lower�endswithZ
WINSERVICErr"rr�objectrrrrr�<module>s

Zerion Mini Shell 1.0