HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.7/asyncio/__pycache__/windows_utils.cpython-37.pyc
B

��g��@s�dZddlZejdkred��ddlZddlZddlZddlZddlZddl	Z	ddl
Z
dZdZej
Z
ejZe��Zdded	�d
d�ZGdd
�d
�ZGdd�dej�ZdS)z)Various Windows specific bits and pieces.�N�win32z
win32 only)�pipe�Popen�PIPE�
PipeHandlei F)TT)�duplex�
overlapped�bufsizec
Cs"tjd�t��tt��d�}|r>tj}tj	tj
B}||}}ntj}tj
}d|}}|tjO}|drp|tj
O}|dr�tj
}nd}d}	}
yZt�||tjd||tjtj�}	t�||dtjtj|tj�}
tj|	dd�}|�d�|	|
fS|	dk	�rt�|	�|
dk	�rt�|
��YnXdS)zELike os.pipe() but with overlapped support and using handles not fds.z\\.\pipe\python-pipe-{:d}-{:d}-)�prefixr�NT)r)�tempfileZmktemp�format�os�getpid�next�
_mmap_counter�_winapiZPIPE_ACCESS_DUPLEXZGENERIC_READZ
GENERIC_WRITEZPIPE_ACCESS_INBOUNDZFILE_FLAG_FIRST_PIPE_INSTANCEZFILE_FLAG_OVERLAPPEDZCreateNamedPipeZ	PIPE_WAITZNMPWAIT_WAIT_FOREVERZNULLZ
CreateFileZ
OPEN_EXISTINGZConnectNamedPipeZGetOverlappedResult�CloseHandle)rrr	ZaddressZopenmode�accessZobsizeZibsizeZflags_and_attribsZh1Zh2Zov�r�1/usr/local/lib/python3.7/asyncio/windows_utils.pyr sB








rc@s\eZdZdZdd�Zdd�Zedd��Zdd	�Ze	j
d
�dd�Zd
d�Zdd�Z
dd�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.
    cCs
||_dS)N)�_handle)�self�handlerrr�__init__VszPipeHandle.__init__cCs2|jdk	rd|j��}nd}d|jj�d|�d�S)Nzhandle=�closed�<� �>)r�	__class__�__name__)rrrrr�__repr__Ys
zPipeHandle.__repr__cCs|jS)N)r)rrrrr`szPipeHandle.handlecCs|jdkrtd��|jS)NzI/O operation on closed pipe)r�
ValueError)rrrr�filenods
zPipeHandle.fileno)rcCs|jdk	r||j�d|_dS)N)r)rrrrr�closeis

zPipeHandle.closecCs,|jdk	r(tjd|��t|d�|��dS)Nz	unclosed )�source)r�warnings�warn�ResourceWarningr$)rrrr�__del__ns
zPipeHandle.__del__cCs|S)Nr)rrrr�	__enter__tszPipeHandle.__enter__cCs|��dS)N)r$)r�t�v�tbrrr�__exit__wszPipeHandle.__exit__N)r �
__module__�__qualname__�__doc__rr!�propertyrr#rrr$r)r*r.rrrrrQsrcs"eZdZdZd�fdd�	Z�ZS)rz�Replacement for subprocess.Popen using overlapped pipe handles.

    The stdin, stdout, stderr are None or instances of PipeHandle.
    Nc	s�|�d�rt�|�dd�dks"t�d}}}d}	}
}|tkrbtddd�\}}	t�|tj�}n|}|tkr�tdd�\}
}
t�|
d�}n|}|tkr�tdd�\}}t�|d�}n|tkr�|}n|}z�y t	�j
|f|||d	�|��Wn4x$|	|
|fD]}|dk	r�t�|�q�W�Yn>X|	dk	�r0t
|	�|_|
dk	�rDt
|
�|_|dk	�rXt
|�|_Wd|tk�rpt�|�|tk�r�t�|�|tk�r�t�|�XdS)
NZuniversal_newlinesr	r)FTT)rr)TF)r)�stdin�stdout�stderr)�get�AssertionErrorrr�msvcrtZopen_osfhandler�O_RDONLY�STDOUT�superrrrrr3r4r5r$)r�argsr3r4r5�kwdsZ	stdin_rfdZ
stdout_wfdZ
stderr_wfdZstdin_whZ	stdout_rhZ	stderr_rhZstdin_rhZ	stdout_whZ	stderr_wh�h)rrrr�sL









zPopen.__init__)NNN)r r/r0r1r�
__classcell__rr)rrr~sr)r1�sys�platform�ImportErrorr�	itertoolsr8r�
subprocessrr&�__all__ZBUFSIZErr:�countrrrrrrrr�<module>s$
1-