AlkantarClanX12

Your IP : 3.144.45.187


Current Path : /opt/alt/python311/lib64/python3.11/asyncio/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib64/python3.11/asyncio/__pycache__/windows_utils.cpython-311.pyc

�

c��f����dZddlZejdkred���ddlZddlZddlZddlZddlZddl	Z	ddl
Z
dZdZej
Z
ejZej��Zdded	�d
�ZGd�d��ZGd
�dej��ZdS)z)Various Windows specific bits and pieces.�N�win32z
win32 only)�pipe�Popen�PIPE�
PipeHandlei F)TT)�duplex�
overlapped�bufsizec
�R�tjd�tj��tt�������}|r*tj}tj	tj
z}||}}ntj}tj
}d|}}|tjz}|dr|tj
z}|dr
tj
}nd}dx}	}
	tj||tjd||tjtj��}	tj||dtjtj|tj��}
tj|	d���}|�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/python311/lib64/python3.11/asyncio/windows_utils.pyrr s����o�1�8�8��I�K�K��m�,�,�.�.�/�/�/�G��$��-���%��(=�=�� �'�����.���&���G�����5�5�H��!�}�1��G�0�0���!�}��#�8������N�B���
�
$��X�w�0�
�v�v�w�;�W�\�K�K���
��V�Q���g�.C��w�|�-�-���
%�b�T�
:�
:�
:��
���t�$�$�$��2�v�
���
�>����#�#�#�
�>����#�#�#�
���s
�BE7�7/F&c�p�eZdZdZd�Zd�Zed���Zd�Ze	j
d�d�Zej
fd�Zd	�Zd
�ZdS)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��||_dS�N��_handle��self�handles  r/�__init__zPipeHandle.__init__Vs
�������c�P�|j�d|j��}nd}d|jj�d|�d�S)Nzhandle=�closed�<� �>)r4�	__class__�__name__r5s  r/�__repr__zPipeHandle.__repr__Ys>���<�#�/�t�|�/�/�F�F��F�6�4�>�*�6�6�V�6�6�6�6r9c��|jSr2r3�r6s r/r7zPipeHandle.handle`s
���|�r9c�<�|j�td���|jS)NzI/O operation on closed pipe)r4�
ValueErrorrCs r/�filenozPipeHandle.filenods!���<���;�<�<�<��|�r9)r%c�F�|j�||j��d|_dSdSr2r3)r6r%s  r/�closezPipeHandle.closeis/���<�#��K���%�%�%��D�L�L�L�$�#r9c�l�|j�,|d|��t|���|���dSdS)Nz	unclosed )�source)r4�ResourceWarningrH)r6�_warns  r/�__del__zPipeHandle.__del__nsC���<�#��E�&�d�&�&���E�E�E�E��J�J�L�L�L�L�L�$�#r9c��|Sr2�rCs r/�	__enter__zPipeHandle.__enter__ss���r9c�.�|���dSr2)rH)r6�t�v�tbs    r/�__exit__zPipeHandle.__exit__vs���
�
�����r9N)r@�
__module__�__qualname__�__doc__r8rA�propertyr7rFrr%rH�warnings�warnrMrPrUrOr9r/rrQs������������7�7�7�����X�����
$+�#6� � � � � �
%�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.
    Nc���|�d��rJ�|�dd��dksJ�dx}x}}dx}	x}
}|tkr4tdd���\}}	tj|t
j��}n|}|tkr)td���\}
}
tj|
d��}n|}|tkr)td���\}}tj|d��}n|tkr|}n|}	t��j	|f|||d	�|��|	�t|	��|_|
�t|
��|_|�t|��|_
n$#|	|
|fD]}|�tj|����xYw|tkrtj|��|tkrtj|��|tkrtj|��dSdS#|tkrtj|��|tkrtj|��|tkrtj|��wwxYw)
N�universal_newlinesr
r)FTT)r	r)TFr)�stdin�stdout�stderr)�getrr�msvcrt�open_osfhandler�O_RDONLY�STDOUT�superr8rr_r`rarr%rH)r6�argsr_r`ra�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}����8�8�0�1�1�1�1�1��x�x�	�1�%�%��*�*�*�*�.2�2�	�2�J��+/�/��/�9�y��D�=�=�!%��t�!L�!L�!L��H�h��-�h���D�D�I�I��I��T�>�>�#'�=�#A�#A�#A� �I�y��.�y�!�<�<�J�J��J��T�>�>�#'�=�#A�#A�#A� �I�y��.�y�!�<�<�J�J�
�v�
�
�#�J�J��J�	%��E�G�G��T�
8��:�$.�
8�
8�26�
8�
8�
8��#�'��1�1��
��$�(��3�3����$�(��3�3�����	��	�9�5�
+�
+���=��'��*�*�*��������}�}����#�#�#���~�~����$�$�$���~�~����$�$�$�$�$��~��	��}�}����#�#�#���~�~����$�$�$���~�~����$�$�$�$����s �=E�AG#�!E?�?G#�#A I)NNN)r@rVrWrXr8�
__classcell__)r?s@r/rr}sG���������+%�+%�+%�+%�+%�+%�+%�+%�+%�+%r9r)rX�sys�platform�ImportErrorr�	itertoolsrcr�
subprocessrrZ�__all__�BUFSIZErrf�countrrrrrOr9r/�<module>r}s%��/�/�
�
�
�
��<�7���
�+�l�
#�
#�#���������
�
�
�
�	�	�	�	�������������0�������	�	���	��!�!�
��\�7�+�+�+�+�+�b&�&�&�&�&�&�&�&�X0%�0%�0%�0%�0%�J��0%�0%�0%�0%�0%r9