Your IP : 3.145.88.104


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

o

6��f��@s�ddlZddlZddlZddlZddlZddlmZmZmZddl	m
Z
ddl	mZdgZdZ
ejdko9eed	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�H/opt/alt/python310/lib64/python3.10/multiprocessing/popen_spawn_win32.py�_path_eqs rcGs|D]}t�|�qdSr
)�_winapi�CloseHandle)Zhandles�handlerrr�_close_handless�rc@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Cslt�|j�}t�dd�\}}t�|d�}tjt�	�|d�}d�
dd�|D��}t��}trAt
|tj�rAtj}tj��}tj|d<nd}t|ddd	��b}	zt�||ddd
d|dd�	\}
}}}
t�|�Wn	t�|��||_d|_|
|_t|
�|_t�|t|jt|�f�|_t|�zt �!||	�t �!||	�Wtd�ntd�wWd�dS1s�wYdS)Nr)Z
parent_pidZpipe_handle� css�|]}d|VqdS)z"%s"Nr)�.0�xrrr�	<genexpr>9s�z!Popen.__init__.<locals>.<genexpr>�__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__,sH
�
�

�"�zPopen.__init__cCs|t�usJ�t�||j�Sr
)rrZ	duplicater+)r.rrrr�duplicate_for_childaszPopen.duplicate_for_childNcCst|jdur7|dur
tj}ntdt|dd��}t�t|j�|�}|tjkr7t�|j�}|t	kr4t
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�pollu�z
Popen.pollcCsN|jdur%zt�t|j�t�WdSty$|jdd�dur!�YdSwdS)Ng�?r<)r(rZTerminateProcessr*r)r5�OSErrorr;r=rrr�	terminatexs
���zPopen.terminatecCs|��dSr
)r,r=rrr�close�r?zPopen.closer
)�__name__�
__module__�__qualname__�__doc__�methodr2r3r;r>rA�killrBrrrrr&s5
)rrr6r!r�contextrrr�rr�__all__r5�platform�getattrZWINEXEr"�lower�endswithZ
WINSERVICErr#r r�objectrrrrr�<module>s 

?>