Your IP : 18.220.110.45


Current Path : /opt/alt/python312/lib64/python3.12/multiprocessing/__pycache__/
Upload File :
Current File : //opt/alt/python312/lib64/python3.12/multiprocessing/__pycache__/popen_spawn_win32.cpython-312.pyc

�

�Q�f���H�ddlZddlZddlZddlZddlZddlmZmZmZddl	m
Z
ddl	mZdgZdZ
ejdk(xr
eed	d
�Zej"j%�j'd�Zd�Zeej"ej,�Zd
�ZGd�de�Zy)�N�)�	reduction�get_spawning_popen�set_spawning_popen)�spawn)�util�Popeni�win32�frozenFzpythonservice.exec��||k(xs?tjj|�tjj|�k(S�N)�os�path�normcase)�p1�p2s  �H/opt/alt/python312/lib64/python3.12/multiprocessing/popen_spawn_win32.py�_path_eqrs4��
��8�C�r�w�w�'�'��+�r�w�w�/?�/?��/C�C�C�c�<�|D]}tj|��yr
)�_winapi�CloseHandle)�handles�handles  r�_close_handlesrs�������F�#�rc�>�eZdZdZdZd�Zd�Zd
d�Zd�Zd�Z	e	Z
d	�Zy)r	z@
    Start a subprocess to run the code of a process object
    rc�d�tj|j�}tjdd�\}}tj|d�}tjtj�|��}tj�}trat|tj�rGtjx|d<}tj j#�}tj|d<nd}dj%d�|D��}t'|dd��5}		tj(||ddd	d|dd�	\}
}}}
tj*|�||_d|_|
|_t3|
�|_t7j8|t:|j4t3|�f�|_t?|�	tAjB||	�tAjB||	�t?d�	ddd�y#tj*|��xYw#t?d�wxYw#1swYyxYw)
Nr)�
parent_pid�pipe_handle�__PYVENV_LAUNCHER__� c3�&K�|]	}d|z���y�w)z"%s"N�)�.0�xs  r�	<genexpr>z!Popen.__init__.<locals>.<genexpr>Fs����/�3�a�v��z�3�s��wbT)�closefdF)"r�get_preparation_data�_namer�
CreatePipe�msvcrt�open_osfhandle�get_command_liner�getpid�get_executable�WINENVr�sys�
executable�_base_executable�environ�copy�join�open�
CreateProcessr�pid�
returncode�_handle�int�sentinelr�Finalizer�	finalizerrr�dump)�self�process_obj�	prep_data�rhandle�whandle�wfd�cmd�
python_exe�env�to_child�hp�htr:�tids              r�__init__zPopen.__init__-s����.�.�{�/@�/@�A�	�#�-�-�d�A�6�����#�#�G�Q�/���$�$��	�	��18�:���)�)�+�
��h�z�3�>�>�:�"%�"6�"6�6�C��F�Z��*�*�/�/�#�C�),���C�%�&��C��h�h�/�3�/�/��
�#�t�T�
*�h�
�#*�#8�#8����$��q�#�t�T�$;� ��B��S��#�#�B�'��D�H�"�D�O��D�L���G�D�M�!�]�]�4��,0�M�M�3�w�<�+H�J�D�N�
�t�$�
)����y�(�3����{�H�5�"�4�(�3+�
*��
��#�#�G�,��� #�4�(��3+�
*�s=�H&�7G;�A%H&�:,H�&H&�;H�H&�
H#�#H&�&H/c�^�|t�usJ�tj||j�Sr
)rr�	duplicater>)rBrs  r�duplicate_for_childzPopen.duplicate_for_childcs+���)�+�+�+�+��"�"�6�4�=�=�9�9rNc��|j�|jS|�tj}ntdt	|dzdz��}tj
t	|j�|�}|tjk(r@tj|j�}|tk(rtj}||_|jS)Nri�g�?)r;r�INFINITE�maxr=�WaitForSingleObjectr<�
WAIT_OBJECT_0�GetExitCodeProcess�	TERMINATE�signal�SIGTERM)rB�timeout�msecs�res�codes     r�waitz
Popen.waitgs����?�?�&��?�?�"��?��$�$�E���3�w��~��3�4�5�E��)�)�#�d�l�l�*;�U�C���'�'�'�'��-�-�d�l�l�;�D��y� ������"�D�O����rc�&�|jd��S)Nr)r\)r`�rBs r�pollz
Popen.pollys���y�y��y�#�#rc��|j�y	tjt|j�t
�y#t$r?tjt|j��}|tjk(r�YywxYwr
)	r;r�TerminateProcessr=r<rY�PermissionErrorrX�STILL_ACTIVE)rBr_s  r�	terminatezPopen.terminate|sm���?�?�&��	��$�$�S����%6�	�B���	��-�-�c�$�,�,�.?�@�D��w�+�+�+��,�		�s�-=�AB�Bc�$�|j�yr
)r@rbs r�closezPopen.close�s�����rr
)�__name__�
__module__�__qualname__�__doc__�methodrOrRr`rcrh�killrjr#rrr	r	's4����F�4)�l:��$$��$�D�r)rr,rZr2r�contextrrr�rr�__all__rY�platform�getattr�WINEXEr3�lower�endswith�
WINSERVICErr4r1r�objectr	r#rr�<module>r{s���	�
�
�
��F�F����)��
�	�

�,�,�'�
!�
C�g�c�8�U�&C��
�^�^�
!�
!�
#�
,�
,�-@�
A�
�D��c�n�n�c�&:�&:�
;�	;��$�j�F�jr

?>