AlkantarClanX12

Your IP : 18.219.47.239


Current Path : /opt/alt/python312/lib64/python3.12/asyncio/__pycache__/
Upload File :
Current File : //opt/alt/python312/lib64/python3.12/asyncio/__pycache__/windows_utils.cpython-312.opt-1.pyc

�

�Q�f����dZddlZejdk7red��ddlZddlZddlZddlZddlZddl	Z	ddl
Z
dZdZejZ
ejZej�Zdded	�d
�ZGd�d�ZGd
�dej&�Zy)z)Various Windows specific bits and pieces.�N�win32z
win32 only)�pipe�Popen�PIPE�
PipeHandlei F)TT)�duplex�
overlapped�bufsizec
��tjdjtj�tt����}|r6tj}tjtjz}||}}n$tj}tj}d|}}|tjz}|dr|tjz}|drtj}nd}dx}	}
	tj||tjd||tj tj"�}	tj$||dtj"tj&|tj"�}
tj(|	d��}|j+d�|	|
fS#|	�tj,|	�|
�tj,|
��xYw)zELike os.pipe() but with overlapped support and using handles not fds.z\\.\pipe\python-pipe-{:d}-{:d}-)�prefixr�NT�r	)�tempfile�mktemp�format�os�getpid�next�
_mmap_counter�_winapi�PIPE_ACCESS_DUPLEX�GENERIC_READ�
GENERIC_WRITE�PIPE_ACCESS_INBOUND�FILE_FLAG_FIRST_PIPE_INSTANCE�FILE_FLAG_OVERLAPPED�CreateNamedPipe�	PIPE_WAIT�NMPWAIT_WAIT_FOREVER�NULL�
CreateFile�
OPEN_EXISTING�ConnectNamedPipe�GetOverlappedResult�CloseHandle)rr	r
�address�openmode�access�obsize�ibsize�flags_and_attribs�h1�h2�ovs            �</opt/alt/python312/lib64/python3.12/asyncio/windows_utils.pyrr s����o�o�1�8�8��I�I�K��m�,�.�/�G���-�-���%�%��(=�(=�=�� �'����.�.���&�&���G�����5�5�5�H��!�}��G�0�0�0���!�}�#�8�8�����N�B���
�
$�
$��X�w�0�0�
�v�v�w�;�;�W�\�\�K���
�
��V�Q����g�.C�.C��w�|�|�-���
%�
%�b�T�
:��
���t�$��2�v�
���
�>�����#�
�>�����#�
�s
�*B6F!�!1Gc�|�eZdZdZd�Zd�Zed��Zd�Ze	jd�d�Zejfd�Zd	�Zd
�Zy)rz�Wrapper for an overlapped pipe handle which is vaguely file-object like.

    The IOCP event loop can use these instead of socket objects.
    c��||_y�N��_handle��self�handles  r/�__init__zPipeHandle.__init__Vs	�����c�x�|j�d|j��}nd}d|jj�d|�d�S)Nzhandle=�closed�<� �>)r4�	__class__�__name__r5s  r/�__repr__zPipeHandle.__repr__YsB���<�<�#��t�|�|�.�/�F��F��4�>�>�*�*�+�1�V�H�A�6�6r9c��|jSr2r3�r6s r/r7zPipeHandle.handle`s���|�|�r9c�H�|j�td��|jS)NzI/O operation on closed pipe)r4�
ValueErrorrCs r/�filenozPipeHandle.filenods"���<�<���;�<�<��|�|�r9)r%c�P�|j�||j�d|_yyr2r3)r6r%s  r/�closezPipeHandle.closeis$���<�<�#�����%��D�L�$r9c�b�|j�#|d|��t|��|j�yy)Nz	unclosed )�source)r4�ResourceWarningrH)r6�_warns  r/�__del__zPipeHandle.__del__ns-���<�<�#��I�d�X�&���E��J�J�L�$r9c��|Sr2�rCs r/�	__enter__zPipeHandle.__enter__ss���r9c�$�|j�yr2)rH)r6�t�v�tbs    r/�__exit__zPipeHandle.__exit__vs���
�
�r9N)r@�
__module__�__qualname__�__doc__r8rA�propertyr7rFrr%rH�warnings�warnrMrPrUrOr9r/rrQsR����7������
$+�#6�#6� �
%�M�M��
�r9rc�$��eZdZdZd�fd�	Z�xZS)rz�Replacement for subprocess.Popen using overlapped pipe handles.

    The stdin, stdout, stderr are None or instances of PipeHandle.
    c����dx}x}}dx}	x}
}|tk(r5tdd��\}}	tj|tj
�}n|}|tk(r&td��\}
}
tj|
d�}n|}|tk(r&td��\}}tj|d�}n|tk(r|}n|}	t�|� |f|||d�|��|	�t|	�|_
|
�t|
�|_|�t|�|_	|tk(rt	j|�|tk(rt	j|�|tk(rt	j|�yy#|	|
|fD]}|��tj|���xYw#|tk(rt	j|�|tk(rt	j|�|tk(rt	j|�wwxYw)N)FTT)r	r)TFrr)�stdin�stdout�stderr)rr�msvcrt�open_osfhandler�O_RDONLY�STDOUT�superr8rr^r_r`rr%rH)r6�argsr^r_r`�kwds�	stdin_rfd�
stdout_wfd�
stderr_wfd�stdin_wh�	stdout_rh�	stderr_rh�stdin_rh�	stdout_wh�	stderr_wh�hr?s                �r/r8zPopen.__init__�s����/3�2�	�2�J��+/�/��/�9�y��D�=�!%��t�!L��H�h��-�-�h����D�I��I��T�>�#'�=�#A� �I�y��.�.�y�!�<�J��J��T�>�#'�=�#A� �I�y��.�.�y�!�<�J�
�v�
�#�J��J�	%��G��T�
8��:�$.�
8�26�
8��#�'��1��
��$�(��3����$�(��3�����}�����#���~�����$���~�����$���#	��	�9�5���=��'�'��*�6�
����}�����#���~�����$���~�����$��s%�=E$�7F�$F	�1F	�	F�AG))NNN)r@rVrWrXr8�
__classcell__)r?s@r/rr}s����+%�+%r9r)rX�sys�platform�ImportErrorr�	itertoolsrar�
subprocessrrZ�__all__�BUFSIZErrd�countrrrrrOr9r/�<module>r{s���/�
��<�<�7��
�l�
#�#���
�	����0��������	�	�	���	���!�
��\�7�+�b&�&�X0%�J���0%r9