uawdijnntqw1x1x1
IP : 18.221.58.191
Hostname : host45.registrar-servers.com
Kernel : Linux host45.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
home
/
.
/
..
/
lib64
/
bpf
/
..
/
gems
/
..
/
.
/
python3.6
/
asyncio
/
__pycache__
/
subprocess.cpython-36.pyc
/
/
3 \��@s�ddgZddlZddlmZddlmZddlmZddlmZdd lmZdd l m Z ejZejZej Z Gdd�dejej�ZGd d�d�Zeddddejfdd��Zeddddejd�dd��ZdS)�create_subprocess_exec�create_subprocess_shell�N�)�events)� protocols)�streams)�tasks)� coroutine)�loggercsPeZdZdZ�fdd�Zdd�Zdd�Zdd �Zd d�Zdd �Z dd�Z �ZS)�SubprocessStreamProtocolz0Like StreamReaderProtocol, but for a subprocess.cs<t�j|d�||_d|_|_|_d|_d|_g|_dS)N)�loopF) �super�__init__�_limit�stdin�stdout�stderr� _transport�_process_exited� _pipe_fds)�self�limitr)� __class__��*/usr/lib64/python3.6/asyncio/subprocess.pyrsz!SubprocessStreamProtocol.__init__cCsf|jjg}|jdk r$|jd|j�|jdk r>|jd|j�|jdk rX|jd|j�ddj|�S)Nzstdin=%rz stdout=%rz stderr=%rz<%s>� )r�__name__r�appendrr�join)r�inforrr�__repr__s z!SubprocessStreamProtocol.__repr__cCs�||_|jd�}|dk rDtj|j|jd�|_|jj|�|jj d�|jd�}|dk r�tj|j|jd�|_ |j j|�|jj d�|jd�}|dk r�tj||d|jd�|_dS)Nr)rr�r)�protocol�readerr) r�get_pipe_transportr�StreamReaderr�_looprZ set_transportrrr�StreamWriterr)r� transportZstdout_transportZstderr_transportZstdin_transportrrr�connection_made(s& z(SubprocessStreamProtocol.connection_madecCs:|dkr|j}n|dkr |j}nd}|dk r6|j|�dS)Nrr!)rrZ feed_data)r�fd�datar#rrr�pipe_data_received@sz+SubprocessStreamProtocol.pipe_data_receivedcCs�|dkr,|j}|dk r|j�|j|�dS|dkr<|j}n|dkrL|j}nd}|dkrt|dkrj|j�n |j|�||jkr�|jj|�|j �dS)Nrrr!) r�closeZconnection_lostrrZfeed_eofZ set_exceptionr�remove�_maybe_close_transport)rr*�exc�piper#rrr�pipe_connection_lostJs$ z-SubprocessStreamProtocol.pipe_connection_lostcCsd|_|j�dS)NT)rr/)rrrr�process_exitedasz'SubprocessStreamProtocol.process_exitedcCs(t|j�dkr$|jr$|jj�d|_dS)Nr)�lenrrrr-)rrrrr/es z/SubprocessStreamProtocol._maybe_close_transport)r� __module__�__qualname__�__doc__rr r)r,r2r3r/� __classcell__rr)rrrs rc@s~eZdZdd�Zdd�Zedd��Zedd��Zd d �Z dd�Z d d�Zedd��Zedd��Z edd��Zeddd��ZdS)�ProcesscCs8||_||_||_|j|_|j|_|j|_|j�|_dS)N)rZ _protocolr&rrrZget_pid�pid)rr(r"rrrrrlszProcess.__init__cCsd|jj|jfS)Nz<%s %s>)rrr:)rrrrr uszProcess.__repr__cCs |jj�S)N)rZget_returncode)rrrr� returncodexszProcess.returncodeccs|jj�EdHS)zdWait until the process exit and return the process return code. This method is a coroutine.N)rZ_wait)rrrr�wait|szProcess.waitcCs|jj|�dS)N)r�send_signal)r�signalrrrr=�szProcess.send_signalcCs|jj�dS)N)r� terminate)rrrrr?�szProcess.terminatecCs|jj�dS)N)r�kill)rrrrr@�szProcess.killccs�|jj�}|jj|�|r,tjd|t|��y|jj�EdHWn8tt fk rx}z|rhtjd||�WYdd}~XnX|r�tjd|�|jj �dS)Nz%%r communicate: feed stdin (%s bytes)z%r communicate: stdin got %rz%r communicate: close stdin)r&� get_debugr�writer �debugr4Zdrain�BrokenPipeError�ConnectionResetErrorr-)r�inputrCr0rrr�_feed_stdin�s zProcess._feed_stdincCsdS)Nr)rrrr�_noop�sz Process._noopccs�|jj|�}|dkr|j}n|dks(t�|j}|jj�rV|dkrDdnd}tjd||�|j �EdH}|jj�r�|dkrzdnd}tjd||�|j �|S)Nr!rrrz%r communicate: read %sz%r communicate: close %s)rr$r�AssertionErrorrr&rAr rC�readr-)rr*r(�stream�name�outputrrr�_read_stream�s zProcess._read_streamNccs�|dk r|j|�}n|j�}|jdk r2|jd�}n|j�}|jdk rP|jd�}n|j�}tj||||jd�EdH\}}}|j�EdH||fS)Nrr!)r) rGrHrrNrrZgatherr&r<)rrFrrrrrr�communicate�s zProcess.communicate)N)rr5r6rr �propertyr;r r<r=r?r@rGrHrNrOrrrrr9ks r9c +sP�dkrtj����fdd�}�j||f|||d�|��EdH\}} t|| ��S)Ncst��d�S)N)rr)rr)rrrr�<lambda>�sz)create_subprocess_shell.<locals>.<lambda>)rrr)r�get_event_loopZsubprocess_shellr9) �cmdrrrrr�kwds�protocol_factoryr(r"r)rrrr�s)rrrrrc/sT�dkrtj����fdd�}�j||f|�|||d�|��EdH\} } t| | ��S)Ncst��d�S)N)rr)rr)rrrrrQ�sz(create_subprocess_exec.<locals>.<lambda>)rrr)rrRZsubprocess_execr9)Zprogramrrrrr�argsrTrUr(r"r)rrrr�s)�__all__� subprocess�rrrrZ coroutinesr �logr �PIPEZSTDOUTZDEVNULLZFlowControlMixinZSubprocessProtocolrr9Z_DEFAULT_LIMITrrrrrr�<module>s(X]
/home/./../lib64/bpf/../gems/.././python3.6/asyncio/__pycache__/subprocess.cpython-36.pyc