shell bypass 403

GrazzMean-Shell Shell

Uname: Linux business55.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
Software: LiteSpeed
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.213.251.212
Your Ip: 18.118.19.210
User: allssztx (535) | Group: allssztx (533)
Safe Mode: OFF
Disable Function:
NONE

name : subprocess.cpython-313.pyc
�

*}g\���SrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSK	r	SSK
r
SSKrSSKJr
 SSKrSSKr/SQrSSKrSr\R*S;r\(aDSSKrSSKJrJrJrJrJrJrJrJrJ r J!r!J"r"J#r#J$r$J%r%J&r&J'r'J(r(J)r)J*r*J+r+ \RY/S	Q5 O*\(aSS
K-J.r/ "SS5r0O
"S
S5r0SSK1r1SSK2r2"SS\35r4"SS\45r5"SS\45r6\(a"SS5r7"SS\85r9O1\:"\1SS5r;\<"\2S5(a
\2Rzr>O\2R~r>\(aSr@SrAO/r@SrASrBSrCSrDS rES!rFS"rGSS#.S$jrHS%rISS#.S&jrJ"S'S(\K5rLSSSSS).S*jrMS+rNSSS,.S-jrOSSS,.S.jrPS/rQ\Q"5rRSrS\<"\S05rT"S1S25rUg!\a SrGN�f=f!\a SrGN�f=f)3a�Subprocesses with accessible I/O streams

This module allows you to spawn processes, connect to their
input/output/error pipes, and obtain their return codes.

For a complete description of this module see the Python documentation.

Main API
========
run(...): Runs a command, waits for it to complete, then returns a
          CompletedProcess instance.
Popen(...): A class for flexibly executing a command in a new process

Constants
---------
DEVNULL: Special value that indicates that os.devnull should be used
PIPE:    Special value that indicates a pipe should be created
STDOUT:  Special value that indicates that stderr should go to stdout


Older API
=========
call(...): Runs a command, waits for it to complete, then returns
    the return code.
check_call(...): Same as call() but raises CalledProcessError()
    if return code is not 0
check_output(...): Same as check_call() but returns the contents of
    stdout instead of a return code
getoutput(...): Runs a command in the shell, waits for it to complete,
    then returns the output
getstatusoutput(...): Runs a command in the shell, waits for it to complete,
    then returns a (exitcode, output) tuple
�N)�	monotonic)�Popen�PIPE�STDOUT�call�
check_call�getstatusoutput�	getoutput�check_output�run�CalledProcessError�DEVNULL�SubprocessError�TimeoutExpired�CompletedProcessTF>�ios�tvos�wasi�watchos�
emscripten)�CREATE_NEW_CONSOLE�CREATE_NEW_PROCESS_GROUP�STD_INPUT_HANDLE�STD_OUTPUT_HANDLE�STD_ERROR_HANDLE�SW_HIDE�STARTF_USESTDHANDLES�STARTF_USESHOWWINDOW�STARTF_FORCEONFEEDBACK�STARTF_FORCEOFFFEEDBACK�ABOVE_NORMAL_PRIORITY_CLASS�BELOW_NORMAL_PRIORITY_CLASS�HIGH_PRIORITY_CLASS�IDLE_PRIORITY_CLASS�NORMAL_PRIORITY_CLASS�REALTIME_PRIORITY_CLASS�CREATE_NO_WINDOW�DETACHED_PROCESS�CREATE_DEFAULT_ERROR_MODE�CREATE_BREAKAWAY_FROM_JOB)rrrrrrrrrr �STARTUPINFOr!r"r#r$r%r&r'r(r)r*)�	fork_execc��\rSrSr\R
r\Rr\Rr\Rr\Rr	\
RrSrg)�	_del_safe�l�N)
�__name__�
__module__�__qualname__�__firstlineno__�os�waitpid�waitstatus_to_exitcode�
WIFSTOPPED�WSTOPSIG�WNOHANG�errno�ECHILD�__static_attributes__r0��1/opt/alt/python313/lib64/python3.13/subprocess.pyr.r.ls;���j�j�G�%'�%>�%>�"����J��{�{�H��j�j�G��\�\�Fr>r.c�@�\rSrSrSrSrSrSrSr\	Rr
Srg)r.�tNr0)r1r2r3r4r6r7r8r9r:r;r<r=r0r>r?r.r.ts%���G�%)�"��J��H��G��\�\�Fr>c��\rSrSrSrg)r�r0N)r1r2r3r4r=r0r>r?rr�s��$r>rc�\�\rSrSrSrS	SjrSr\S5r\RS5rSr
g)
r
�z�Raised when run() is called with check=True and the process
returns a non-zero exit status.

Attributes:
  cmd, returncode, stdout, stderr, output
Nc�4�XlX lX0lX@lg�N)�
returncode�cmd�output�stderr)�selfrHrIrJrKs     r?�__init__�CalledProcessError.__init__�s��$�������r>c�:�UR(aDURS:a4SUR<S[R"UR*5<S3$SURUR4-$![a SURUR*4-s$f=f)Nr�	Command 'z' died with �.z)Command '%s' died with unknown signal %d.z.Command '%s' returned non-zero exit status %d.)rHrI�signal�Signals�
ValueError�rLs r?�__str__�CalledProcessError.__str__�s����?�?�t����2�
4����&�.�.�$�/�/�1A�"B�D�D�D��H�H�d�o�o�G/�/�
/��	�
4�B����4�?�?�"2�F4�4�4�
4�s�3A1�1&B�Bc��UR$)z+Alias for output attribute, to match stderr�rJrUs r?�stdout�CalledProcessError.stdout�s���{�{�r>c��XlgrGrY�rL�values  r?rZr[��	���r>)rIrJrHrK�NN�r1r2r3r4�__doc__rMrV�propertyrZ�setterr=r0r>r?r
r
�s=����
/������]�]���r>r
c�\�\rSrSrSrS	SjrSr\S5r\RS5rSr
g)
r�z�This exception is raised when the timeout expires while waiting for a
child process.

Attributes:
    cmd, output, stdout, stderr, timeout
Nc�4�XlX lX0lX@lgrG)rI�timeoutrJrK)rLrIrhrJrKs     r?rM�TimeoutExpired.__init__�s���������r>c�@�SUR<SUR<S3$)NrPz' timed out after z seconds)rIrhrUs r?rV�TimeoutExpired.__str__�s�����4�<�<�)�	*r>c��UR$rGrYrUs r?rZ�TimeoutExpired.stdout�s���{�{�r>c��XlgrGrYr]s  r?rZrm�r_r>)rIrJrKrhr`rar0r>r?rr�s=����*������]�]���r>rc�2�\rSrSrSSSSSSS.SjrSrSrg)r+��rN��dwFlags�	hStdInput�
hStdOutput�	hStdError�wShowWindow�lpAttributeListc�d�XlX lX0lX@lXPlU=(d S/0Ulg)N�handle_listrq)rLrrrsrtrurvrws       r?rM�STARTUPINFO.__init__�s.��"�L�&�N�(�O�&�N�*��#2�#I�}�b�6I�D� r>c	���URR5nSU;a[US5US'[URUR
URURURUS9$)Nryrq)	rw�copy�listr+rrrsrtrurv)rL�	attr_lists  r?r|�STARTUPINFO.copy�sf���,�,�1�1�3�I��	�)�+/�	�-�0H�+I�	�-�(��t�|�|�)-���*.�/�/�)-���+/�+;�+;�/8�:�
:r>)rrrursrtrwrv)r1r2r3r4rMr|r=r0r>r?r+r+�s��&'�4�D�#��D�	J�
	:r>r+c�H�\rSrSrSr\R4SjrSrSr	\r
Srg)�Handle��Fc�F�UR(dSUlU"U5 gg)NT��closed)rL�CloseHandles  r?�Close�Handle.Close�s���;�;�"����D�!�r>c�^�UR(dSUl[U5$[S5e)NTzalready closed)r��intrTrUs r?�Detach�
Handle.Detach�s&���;�;�"����4�y� ��-�.�.r>c�J�SURR[U54-$)Nz%s(%d))�	__class__r1r�rUs r?�__repr__�Handle.__repr__�s ���t�~�~�6�6��D�	�B�B�Br>r�N)r1r2r3r4r��_winapir�r�r�r��__del__r=r0r>r?r�r��s'����$+�$7�$7�	"�
	/�	C��r>r��PIPE_BUFi�PollSelectorc��grGr0r0r>r?�_cleanupr�	s��r>c���[cg[SSH;nUR[RS9nUcM%[R	U5 M= g![
a MMf=f)N��
_deadstate)�_active�_internal_poll�sys�maxsize�removerT)�inst�ress  r?r�r�s[���?���A�J�D��%�%����%�=�C�����N�N�4�(�	��
"����s�A�
A �A ���������c�x�/n[RRnUS:�aURSSU--5 U$)zcReturn a list of command-line arguments reproducing the current
optimization settings in sys.flags.r�-�O)r��flags�optimize�append)�argsr^s  r?�"_optim_args_from_interpreter_flagsr�(s9���D��I�I���E��q�y����C�#��+�%�&��Kr>c�j�SSSSSSS.n[5nUR5H=up#[[RU5nUS:�dM'URS	X4--5 M? [RR(aURS
5 O�[RR(aURS5 [RR(aURS5 [RR(aURS
5 [RSSn[[S05n[RRn[RRnUS:�aURS5 OU(aURS5 U(aURS5 UHnURSU-5 M U(aURS5 SH2nX6;dM
Xcn	U	SLaUn
O	U<SU	<3n
URSU
45 M4 U$)zyReturn a list of command-line arguments reproducing the current
settings in sys.flags, sys.warnoptions and sys._xoptions.�d�B�S�v�b�q)�debug�dont_write_bytecode�no_site�verbose�
bytes_warning�quietrr�z-Iz-Ez-sz-PN�	_xoptions�zerror::BytesWarningzdefault::BytesWarning�defaultz-W)�-X�dev)�faulthandler�tracemalloc�
importtime�frozen_modules�showrefcount�utf8�gilT�=r�)r��items�getattrr�r�r��isolated�ignore_environment�no_user_site�	safe_path�warnoptionsr��dev_moder��extend)�flag_opt_mapr��flag�optr��warnopts�xoptionsr�r�r^�args           r?�_args_from_interpreter_flagsr�2s���� #�����
�L�.�/�D�!�'�'�)�	���C�I�I�t�$���q�5��K�K��c�g�
�&�*�
�y�y������D���9�9�'�'��K�K����9�9�!�!��K�K����9�9����K�K������q�!�H��s�K��,�H��I�I�+�+�M��y�y�!�!�H��q�����-�.�	����/�0�����	�"������D�3�J�������M�"�A���?��M�E���}���!$�e�,���K�K��s��$�A��Kr>c���[RR(a�[R"5nURR
nSnUR=n(a5URR
U:waOUS-
nUR=n(aM5[R"S[U5 [RR(ag[R"5$)N�r�z"'encoding' argument not specified.zutf-8)
r�r��warn_default_encoding�	_getframe�f_code�co_filename�f_back�warnings�warn�EncodingWarning�	utf8_mode�locale�getencoding)�f�filename�
stacklevels   r?�_text_encodingr�os����y�y�&�&��M�M�O���8�8�'�'���
��8�8�m�a�m��x�x�#�#�x�/���!�O�J��8�8�m�a�m�	�
�
�:�%�z�	3��y�y�����!�!�#�#r>�rhc��[U0UD6nURUS9sSSS5 $! UR5 e=f!,(df   g=f)z�Run command with arguments.  Wait for command to complete or
timeout, then return the returncode attribute.

The arguments are the same as for the Popen constructor.  Example:

retcode = call(["ls", "-l"])
r�N)r�wait�kill)rh�	popenargs�kwargs�ps    r?rr�sJ��
�	�	$�V�	$��	��6�6�'�6�*�
%�	$��	�
�F�F�H���

%�	$�s�<�&�9�<�
A
c�p�[U0UD6nU(a$URS5nUcUSn[X#5eg)a7Run command with arguments.  Wait for command to complete.  If
the exit code was zero then return, otherwise raise
CalledProcessError.  The CalledProcessError object will have the
return code in the returncode attribute.

The arguments are the same as for the call function.  Example:

check_call(["ls", "-l"])
r�r)r�getr
)r�r��retcoderIs    r?rr�s@���I�(��(�G���j�j�� ���;��A�,�C� ��.�.�r>c�N�SHnX2;dM
[US35e SU;agUScaURS5(dBURS5(d,URS5(dURS5(aSnOS	nXBS'[U[US
S.UD6R$)a�Run command with arguments and return its output.

If the exit code was non-zero it raises a CalledProcessError.  The
CalledProcessError object will have the return code in the returncode
attribute and output in the output attribute.

The arguments are the same as for the Popen constructor.  Example:

>>> check_output(["ls", "-l", "/dev/null"])
b'crw-rw-rw- 1 root root 1, 3 Oct 18  2007 /dev/null\n'

The stdout argument is not allowed as it is used internally.
To capture standard error in the result, use stderr=STDOUT.

>>> check_output(["/bin/sh", "-c",
...               "ls -l non_existent_file ; exit 0"],
...              stderr=STDOUT)
b'ls: non_existent_file: No such file or directory\n'

There is an additional optional argument, "input", allowing you to
pass a string to the subprocess's stdin.  If you use this argument
you may not also use the Popen constructor's "stdin" argument, as
it too will be used internally.  Example:

>>> check_output(["sed", "-e", "s/foo/bar/"],
...              input=b"when in the course of fooman events\n")
b'when in the course of barman events\n'

By default, all communication is in bytes, and therefore any "input"
should be bytes, and the return value will be bytes.  If in text mode,
any "input" should be a string, and the return value will be a string
decoded according to locale encoding, or by "encoding" if set. Text mode
is triggered by setting any of text, encoding, errors or universal_newlines.
)rZ�checkz- argument not allowed, it will be overridden.�input�universal_newlines�text�encoding�errors�r>T)rZrhr�)rTr�rrrZ)rhr�r��kw�emptys     r?rr�s���F"��
�<���t�#P�Q�R�R�"��&��V�G�_�4��:�:�*�+�+�v�z�z�&�/A�/A�V�Z�Z�PZ�E[�E[��:�:�h�'�'��E��E��w���	�$��t������ r>c�R�\rSrSrSrSSjrSr\"\R5r
SrSrg)	ri�a)A process that has finished running.

This is returned by run().

Attributes:
  args: The list or str args passed to run().
  returncode: The exit code of the process, negative for signals.
  stdout: The standard output (None if not captured).
  stderr: The standard error (None if not captured).
Nc�4�XlX lX0lX@lgrG)r�rHrZrK)rLr�rHrZrKs     r?rM�CompletedProcess.__init__�s���	�$�����r>c��SRUR5SRUR5/nURb*UR	SRUR55 UR
b*UR	SRUR
55 SR[
U5RSRU55$)Nz	args={!r}zreturncode={!r}zstdout={!r}zstderr={!r}z{}({})z, )	�formatr�rHrZr�rK�typer1�join)rLr�s  r?r��CompletedProcess.__repr__�s����"�"�4�9�9�-�!�(�(����9�;���;�;�"��K�K�
�,�,�T�[�[�9�:��;�;�"��K�K�
�,�,�T�[�[�9�:����t�D�z�2�2�D�I�I�d�O�D�Dr>c��UR(a6[URURURUR5eg)z6Raise CalledProcessError if the exit code is non-zero.N)rHr
r�rZrKrUs r?�check_returncode�!CompletedProcess.check_returncode�s4���?�?�$�T�_�_�d�i�i����%)�[�[�2�
2�r>)r�rHrKrZr`)
r1r2r3r4rbrMr��classmethod�types�GenericAlias�__class_getitem__rr=r0r>r?rr�s*��	��E�$�E�$6�$6�7��2r>r)r��capture_outputrhr�c��Ub&URS5b[S5e[US'U(aAURS5cURS5b[S5e[US'[US'[U0UD6nUR	XS9upxUR5n
U(aU
(a[X�RXxS9eSSS5 [WRW
WW5$![
aOn	UR
5 [(aUR	5uU	lU	l	eUR5 eSn	A	f UR
5 e=f!,(df   N�=f)	a(Run command with arguments and return a CompletedProcess instance.

The returned instance will have attributes args, returncode, stdout and
stderr. By default, stdout and stderr are not captured, and those attributes
will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them,
or pass capture_output=True to capture both.

If check is True and the exit code was non-zero, it raises a
CalledProcessError. The CalledProcessError object will have the return code
in the returncode attribute, and output & stderr attributes if those streams
were captured.

If timeout is given, and the process takes too long, a TimeoutExpired
exception will be raised.

There is an optional argument "input", allowing you to
pass bytes or a string to the subprocess's stdin.  If you use this argument
you may not also use the Popen constructor's "stdin" argument, as
it will be used internally.

By default, all communication is in bytes, and therefore any "input" should
be bytes, and the stdout and stderr will be bytes. If in text mode, any
"input" should be a string, and stdout and stderr will be strings decoded
according to locale encoding, or by "encoding" if set. Text mode is
triggered by setting any of text, encoding, errors or universal_newlines.

The other arguments are the same as for the Popen constructor.
N�stdinz/stdin and input arguments may not both be used.rZrKz@stdout and stderr arguments may not be used with capture_output.r��rJrK)r�rTrr�communicaterr��
_mswindowsrZrKr��pollr
r�r)r�r
rhr�r�r��processrZrK�excr�s           r?rrsD��<
���:�:�g��*��N�O�O���w����:�:�h��+�v�z�z�(�/C�/O��4�5�
5���x����x��	�	�	$�V�	$��	�$�0�0��0�H�N�F�&�,�,�.���W�$�W�l�l�,2�C�
C�/
%�2�G�L�L�'�6�6�B�B��-�
	��L�L�N��z�*1�)<�)<�)>�&��
�C�J�

�������	��L�L�N���)
%�	$�s1�=E�?C"�2E�"
E�,A
D6�6E�E�
Ec��/nSn[[RU5GH n/nU(aURS5 SU;=(d SU;=(d U(+nU(aURS5 UH�nUS:XaURU5 MUS:Xa5URS[	U5-S-5 /nURS5 MWU(aURU5 /nURU5 M� U(aURU5 U(dM�URU5 URS5 GM# SR
U5$)	aM
Translate a sequence of arguments into a command line
string, using the same rules as the MS C runtime:

1) Arguments are delimited by white space, which is either a
   space or a tab.

2) A string surrounded by double quotation marks is
   interpreted as a single argument, regardless of white space
   contained within.  A quoted string can be embedded in an
   argument.

3) A double quotation mark preceded by a backslash is
   interpreted as a literal double quotation mark.

4) Backslashes are interpreted literally, unless they
   immediately precede a double quotation mark.

5) If backslashes immediately precede a double quotation mark,
   every pair of backslashes is interpreted as a literal
   backslash.  If the number of backslashes is odd, the last
   backslash escapes the next double quotation mark as
   described in rule 3.
F� �	�"�\r�z\"r�)�mapr5�fsdecoder��lenr�r)�seq�result�	needquoter��bs_buf�cs      r?�list2cmdliner Fs��<�F��I��2�;�;��$������M�M�#���C�Z�<�T�S�[�<��W�	���M�M�#���A��D�y��
�
�a� ��c���
�
�d�S��[�0��2�3����
�
�e�$���M�M�&�)��F��
�
�a� ��"��M�M�&�!��9��M�M�&�!��M�M�#��C%�F�7�7�6�?�r>�r�r�c	��[USS[XS9nSnUSSS:XaUSSnXC4$![a"nURnURnSnAN8SnAff=f)a�Return (exitcode, output) of executing cmd in a shell.

Execute the string 'cmd' in a shell with 'check_output' and
return a 2-tuple (status, output). The locale encoding is used
to decode the output and process newlines.

A trailing newline is stripped from the output.
The exit status for the command can be interpreted
according to the rules for the function 'wait'. Example:

>>> import subprocess
>>> subprocess.getstatusoutput('ls /bin/ls')
(0, '/bin/ls')
>>> subprocess.getstatusoutput('cat /bin/junk')
(1, 'cat: /bin/junk: No such file or directory')
>>> subprocess.getstatusoutput('/bin/junk')
(127, 'sh: /bin/junk: not found')
>>> subprocess.getstatusoutput('/bin/kill $$')
(-15, '')
T)�shellr�rKr�r�rNr��
)rrr
rJrH)rIr�r��data�exitcode�exs      r?r	r	�sh��*!��C�t�$�v�%-�>�����B�C�y�D���C�R�y���>����!��y�y���=�=���!�s�&�
A�A
�
Ac��[XUS9S$)a
Return output (stdout or stderr) of executing cmd in a shell.

Like getstatusoutput(), except the exit status is ignored and the return
value is a string containing the command's output.  Example:

>>> import subprocess
>>> subprocess.getoutput('ls /bin/ls')
'/bin/ls'
r!r�)r	)rIr�r�s   r?r
r
�s���3�&�A�!�D�Dr>c��[(d[[S5(dg[RS;ag[R
"S5nUR
SS9n[U5S:wa[eUS	n[[[USR
S
555n[RS:Xa
US:XaUS
:�agg![[[4a gf=f)adCheck if posix_spawn() can be used for subprocess.

subprocess requires a posix_spawn() implementation that properly reports
errors to the parent process, & sets errno on the following failures:

* Process attribute actions failed.
* File actions failed.
* exec() failed.

Prefer an implementation which can use vfork() in some cases for best
performance.
�posix_spawnF)�darwin�sunos5T�CS_GNU_LIBC_VERSIONr�)�maxsplitr�rrQ�linux�glibc)r��)r�hasattrr5r��platform�confstr�splitrrT�tuplerr��AttributeError�OSError)�ver�parts�libc�versions    r?�_use_posix_spawnr=�s����z���]�3�3��
�|�|�+�+��
��j�j�.�/���	�	�1�	�%���u�:��?����Q�x����C��q�����!4�5�6���<�<�7�"�t�w��7�g�;M����
�J��0�
���
�s�B
C�C�C�POSIX_SPAWN_CLOSEFROMc�F�\rSrSrSrSrS/SSSSSSSSSS.	SjjrSr\"\	R5r\S	5r
\
RS
5r
SrSrS
r\R&\R*4SjrSrSrS0SjrSrSrS1SjrS2SjrSr\R@S5r!\"(aGSr#Sr$Sr%Sr&S\'RP\'RR\'RT4Sjr+Sr,Sr-Sr.S r/S!r0\0r1S.r7gS"r#S#r2S$r&\34S%jr4S\34S&jr+S'r5S(r,S)r.S*r6S+r/S,r0S-r1S.r7g)3ri�a�Execute a child program in a new process.

For a complete description of the arguments see the Python documentation.

Arguments:
  args: A string, or a sequence of program arguments.

  bufsize: supplied as the buffering argument to the open() function when
      creating the stdin/stdout/stderr pipe file objects

  executable: A replacement program to execute.

  stdin, stdout and stderr: These specify the executed programs' standard
      input, standard output and standard error file handles, respectively.

  preexec_fn: (POSIX only) An object to be called in the child process
      just before the child is executed.

  close_fds: Controls closing or inheriting of file descriptors.

  shell: If true, the command will be executed through the shell.

  cwd: Sets the current directory before the child is executed.

  env: Defines the environment variables for the new process.

  text: If true, decode stdin, stdout and stderr using the given encoding
      (if set) or the system default otherwise.

  universal_newlines: Alias of text, provided for backwards compatibility.

  startupinfo and creationflags (Windows only)

  restore_signals (POSIX only)

  start_new_session (POSIX only)

  process_group (POSIX only)

  group (POSIX only)

  extra_groups (POSIX only)

  user (POSIX only)

  umask (POSIX only)

  pass_fds (POSIX only)

  encoding and errors: Text mode encoding and error handling to use for
      file objects stdin, stdout and stderr.

Attributes:
    stdin, stdout, stderr, pid, returncode
Fr�N)	�user�group�extra_groupsr�r�r��umask�pipesize�
process_groupc	�f�[(d+[[R[R
S35e[
5 [R"5Ul	SUl
SUlUcSn[U[5(d[S5eU[La[!S5eUcSn[U[5(d[S5e["(aUb[!S5eOJU(a$U(d[$R&"S	[(5 S
nU
b[!S5eUS:wa[!S
5eXlSUlSUlSUlSUlSUlUUlUUlUUlUb&Ub#[=U5[=U5:wa[?S5eU=(d U=(d U=(d UUl UR@(aUc[C5=UlnSUl"SUl#UR@(a
US:XaS
nSnOSnUcSnSnUb�[I[JS5(d[!S5e[U[L5(a!SSK'nURSU5RTnO;[U[5(aUnO#[SRW[YU555eUS:a[!SU35eSnUb�[I[JS5(d[!S5e[U[L5(a[!S5e/nUH�n[U[L5(a1SSK'nUR[URSU5RT5 MI[U[5(aUR[U5 Mq[SRW[YU555e UHn U S:dM[!SU 35e Sn!Ub�[I[JS5(d[!S5e[U[L5(a!SSK.n"U"R_U5R`n!O#[U[5(aUn!O[S5eU!S:a[!SU!35eURcXEU5un#n$n%n&n'n(["(a�U$S:wa%[dRf"U$Ri5S5n$U%S:wa%[dRf"U%Ri5S5n%U'S:wa%[dRf"U'Ri5S5n'U$S:waU[jRl"U$S U5UlUR@(a'[jRn"UR,S
WUUS!9UlU%S:waS[jRl"U%S"U5UlUR@(a%[jRn"UR.UUS#9UlU'S:waS[jRl"U'S"U5UlUR@(a%[jRn"UR0UUS#9UlURqXXxUX�X�U	U#U$U%U&U'U(UUUU!UUU5 g![Pa [!S5ef=f![Pa [!S5ef=f![Pa [!S5ef=f! [sSUR,UR.UR045H%n)U)Ru5 M![a M#f=f URF(d�/n*U[v:XaU*R[U#5 U[v:XaU*R[U&5 U[v:XaU*R[U(5 [IUS$5(aU*R[URx5 U*H]n+["(a'[U+[z5(aU+R}5 M6[JRt"U+5 MN![a M[f=f e=f)%zCreate new Popen instance.z does not support processes.NFr�zbufsize must be an integerz"STDOUT can only be used for stderrzpipesize must be an integerz0preexec_fn is not supported on Windows platformszpass_fds overriding close_fds.Tz2startupinfo is only supported on Windows platformsrz4creationflags is only supported on Windows platformszlCannot disambiguate when both text and universal_newlines are supplied but different. Pass one or the other.g�?r��setregidz>The 'group' parameter is not supported on the current platformzHThe group parameter cannot be a string on systems without the grp modulez,Group must be a string or an integer, not {}z!Group ID cannot be negative, got �	setgroupszEThe 'extra_groups' parameter is not supported on the current platformz#Groups must be a list, not a stringzIItems in extra_groups cannot be strings on systems without the grp modulez9Items in extra_groups must be a string or integer, not {}�setreuidz=The 'user' parameter is not supported on the current platformzGThe user parameter cannot be a string on systems without the pwd modulez#User must be a string or an integerz User ID cannot be negative, got �wb)�
write_through�line_bufferingr�r��rbr!�_devnull)?�_can_fork_execr8r;�ENOTSUPr�r3r��	threading�Lock�
_waitpid_lock�_input�_communication_started�
isinstancer��	TypeErrorrrTrr�r��RuntimeWarningr�rrZrK�pidrHr�r�rD�boolr�	text_moder��_sigint_wait_secs�_closed_child_pipe_fdsr2r5�str�grp�ImportError�getgrnam�gr_gidr�rr��pwd�getpwnam�pw_uid�_get_handles�msvcrt�open_osfhandler��io�open�
TextIOWrapper�_execute_child�filter�closerrNr�r�),rLr��bufsize�
executablerrZrK�
preexec_fn�	close_fdsr#�cwd�envr��startupinfo�
creationflags�restore_signals�start_new_session�pass_fdsr@rArBr�r�r�rCrDrErL�gidr_�gids�extra_group�	gid_check�uidrc�p2cread�p2cwrite�c2pread�c2pwrite�errread�errwriter��to_close�fds,                                            r?rM�Popen.__init__.s$���~���
�
�#�,�,��/K�L��
�	�
�'�^�^�-������&+��#��?��G��'�3�'�'��8�9�9��V���A�B�B����H��(�C�(�(��9�:�:��:��%� �"-�.�.�&�
�	��
�
�>��O� �	��&� �"-�.�.���!� �"-�.�.��	���
������������� ��
���� ��
�
��!3�!?��'�(�D��J�6�!�#F�G�
G�"�I�V�I�t�I�7I����>�>�h�.�'5�'7�7�D�M�H�
"&���&+��#��>�>��!�|�!%����!&��� ��M������2�z�*�*� �"4�5�5��E�3�'�'�J��
�l�l�5�)�0�0���E�3�'�'���� N�!'���U��!4�6�6��Q�w� �#D�S�E�!J�K�K����#��2�{�+�+� �"E�F�F��L�#�.�.� �!F�G�G��D�+���k�3�/�/�7�"��K�K����[� 9� @� @�A���S�1�1��K�K��,�#�%9�%+�V�D��,=�%>�@�@� ,�&"�	��q�=�$�'H���%T�U�U�"������2�z�*�*� �"8�9�9��D�#�&�&�J���l�l�4�(�/�/���D�#�&�&���� E�F�F��Q�w� �#C�C�5�!I�J�J�&#�/�/��v�F�	��(�	�(�	�(��:��2�~�!�0�0����1B�A�F���"�}� �/�/����0@�!�D���"�}� �/�/����0@�!�D��6	��2�~��W�W�X�t�W�=��
��>�>�!#�!1�!1�$�*�*�D�+9�%-�f�">�D�J��"�}� �g�g�g�t�W�=����>�>�"$�"2�"2�4�;�;�%-�f�#>�D�K��"�}� �g�g�g�t�W�=����>�>�"$�"2�"2�4�;�;�%-�f�#>�D�K�
����*� (�#� +�E� '�� '�� '�� /� #�T�3�� 1�=�
B��o#�J�$�&I�J�J�J��8'�7�(�*6�7�7�7��8#�J�$�&I�J�J�J��P	��D�4�:�:�t�{�{�D�K�K�"H�I����G�G�I�������J��.�.����D�=��O�O�G�,��T�>��O�O�H�-��T�>��O�O�H�-��4��,�,��O�O�D�M�M�2�"�B��%�:�*�R��*@�*@��H�H�J��H�H�R�L��"�����
#�
�s��X�X2�+Y�(D0Y$�X/�2Y�Y!�$2^0�Z)�'^0�)
Z7�3^0�6Z7�7B^0�0^�^0�^�^0�
^*�&^0�)^*�*^0c��SURRSURSUR<S3n[	U5S:�aUSSS-nU$)N�<z: returncode: z args: �>�P�Lz...>)r�r1rHr�r)rL�obj_reprs  r?r��Popen.__repr__2s]������'�'�(�)��?�?�+�7�4�9�9�-�q�
B�	��x�=�2�����}�v�-�H��r>c��UR$rG)r[rUs r?r��Popen.universal_newlines=s���~�~�r>c�$�[U5UlgrG)rZr[)rLr�s  r?r�r�Cs���0�1��r>c�h�URX#5nURSS5RSS5$)Nz
r$�
)�decode�replace)rLr%r�r�s    r?�_translate_newlines�Popen._translate_newlinesGs.���{�{�8�,���|�|�F�D�)�1�1�$��=�=r>c��U$rGr0rUs r?�	__enter__�Popen.__enter__Ks���r>c��UR(aURR5 UR(aURR5 UR(aURR5 U[:Xa2UR
S:�aUR
UR
S9 SUlgUR5 g![a N%f=f!U[:XaEUR
S:�a+UR
UR
S9 O![a Of=fSUl gUR5 f=f)Nrr�)	rZrnrKr�KeyboardInterruptr\�_waitrr�)rL�exc_typer^�	tracebacks    r?�__exit__�Popen.__exit__Ns���;�;��K�K�����;�;��K�K����	��z�z��
�
� � �"��,�,��)�)�A�-���
�
�4�+A�+A�
�B�*+��&��
�I�I�K��
*������,�,��)�)�A�-���
�
�4�+A�+A�
�B��)�����)*��&��
�I�I�K�sH�+C �C�
C�C� E�<D�E�
D#� E�"D#�#E�0Ec���UR(dgURcU"SUR-[US9 UR	US9 URc[
b[
R
U5 ggg)Nzsubprocess %s is still running)�sourcer�)�_child_createdrHrY�ResourceWarningr�r�r�)rL�_maxsize�_warns   r?r��
Popen.__del__jsi���"�"���?�?�"�
�2�T�X�X�=�!�$�
0�	
���x��0��?�?�"�w�':��N�N�4� �(;�"r>c��[US5(d8[R"[R[R5UlUR
$)NrN)r2r5rj�devnull�O_RDWRrNrUs r?�_get_devnull�Popen._get_devnullys3���t�Z�(�(��G�G�B�J�J��	�	�:�D�M��}�}�r>c��U(aURRU5 URR
5 g![a N([a)nUR[R
:XaSnANTeSnAff=f![a g[a)nUR[R
:XaSnAgeSnAff=frG)r�write�BrokenPipeErrorr8r;�EINVALrn)rLr�rs   r?�_stdin_write�Popen._stdin_write~s����
��
�
� � ��'�	��J�J�����#�
���
��9�9����,����
���	���	��y�y�E�L�L�(����		�sF�A�B�
A>�	A>�A9�8A9�9A>�
B?�
	B?�B:�9B:�:B?c��UR(aU(a[S5eUGcUR(d�URURUR/RS5S:�a�SnSnUR(aUR
U5 O�UR(a5URR5nURR5 OEUR(a4URR5nURR5 UR5 X44$Ub[5U-nOSnURXU5up4SUlURURU5S9nX44$![a^ Ub&[URURU55nOURnSUlUR!US9 e!["a ef=ff=f!SUlf=f)a�Interact with process: Send data to stdin and close it.
Read data from stdout and stderr, until end-of-file is
reached.  Wait for process to terminate.

The optional "input" argument should be data to be sent to the
child process, or None, if no data should be sent to the child.
communicate() returns a tuple (stdout, stderr).

By default, all communication is in bytes, and therefore any
"input" should be bytes, and the (stdout, stderr) will be bytes.
If in text mode (indicated by self.text_mode), any "input" should
be a string, and (stdout, stderr) will be strings decoded
according to locale encoding, or by "encoding" if set. Text mode
is triggered by setting any of text, encoding, errors or
universal_newlines.
z.Cannot send input after starting communicationNr�rr�T)rUrTrrZrK�countr��readrnr��_time�_communicater��minr\�_remaining_timer�r)rLr�rhrZrK�endtime�sigint_timeout�stss        r?r�Popen.communicate�s���$�&�&�5��M�N�N�

�O�D�$?�$?�
�Z�Z����d�k�k�2�8�8��>�!�C��F��F��z�z��!�!�%�(�������)�)�+�����!�!�#�������)�)�+�����!�!�#��I�I�K�:���7�"��'�G�+����
3�!%�!2�!2�5�7�!K����"/3��+��)�)�D�$8�$8��$A�)�B�C�����)%�

��&�%(��)?�)?�)-�)=�)=�g�)F�&H�N�&*�%;�%;�N�)*��&���J�J�~�J�6���&������

�� /3��+�s=�F�AG-�G�G-�
G)�&G-�(G)�)G-�-G0�0	G9c�"�UR5$)zKCheck if child process has terminated. Set and return returncode
attribute.)r�rUs r?r�
Popen.poll�s���"�"�$�$r>c�$�UcgU[5-
$)z5Convenience for _communicate when computing timeouts.N)r�)rLr�s  r?r��Popen._remaining_time�s���?���U�W�$�$r>c���UcgU(d[5U:�aH[URUU(aSRU5OSU(aSRU5S9eSS9eg)z2Convenience for checking if a timeout has expired.Nr>r
)r�rr�r)rLr��orig_timeout�
stdout_seq�
stderr_seq�skip_check_and_raises      r?�_check_timeout�Popen._check_timeout�sf���?���5�7�W�#4� ��I�I�|�3=�3�8�8�J�/�4�3=�3�8�8�J�/�I�
I�DH�I�
I�$5r>c��Ub
[5U-nURUS9$![a^ Ub&[URURW55nOURnSUlURUS9 e![a ef=ff=f)z=Wait for child process to terminate; returns self.returncode.r�r)r�r�r�r�r\r�r)rLrhr�r�s    r?r��
Popen.wait�s������g��'�G�	��:�:�g�:�.�.�� �	�
�"�!$�T�%;�%;�%)�%9�%9�'�%B�"D��"&�!7�!7��%&�D�"�
��
�
�>�
�2�
��"�
���
��	�s.�!�AB	�(A8�7B	�8
B�B	�B�B	c���[USS5n[R"5n[(adUS:waUR	UR
5 US:waUR	UR
5 US:waUR	UR
5 O�US:wa+US:wa%X:wa UR	[RU5 US:wa+US:wa%XG:wa UR	[RU5 US:wa+US:wa%Xg:wa UR	[RU5 Ub UR	[RU5 SSS5 SUlg!,(df   N=f)NrNr�T)	r��
contextlib�	ExitStackr�callbackr�r5rnr])	rLrr�r�r�r�r��
devnull_fd�stacks	         r?�_close_pipe_fds�Popen._close_pipe_fdss��
�T�:�t�4�
�
�
!�
!�
#�u��z��b�=��N�N�7�=�=�1��r�>��N�N�8�>�>�2��r�>��N�N�8�>�>�2���b�=�X��^��8M��N�N�2�8�8�W�5��r�>�g��m��8N��N�N�2�8�8�X�6��r�>�g��m��8N��N�N�2�8�8�X�6��%����r�x�x��4�#$�('+��#�)$�
#�s�D&E�
E'c#�H# �/nUv� g! [US5(aURUR5 U?UH]n[(a'[	U[
5(aUR
5 M6[R"U5 MN![a M[f=f e=f7f)zCHelper to ensure file descriptors opened in _get_handles are closedrNN)
r2r�rNrrVr�r�r5rnr8)rLr�r�s   r?�_on_error_fd_closer�Popen._on_error_fd_closer)s������	��N��	��t�Z�(�(�����
�
�.��M����!�z�j��V�&<�&<����
������������
�
�sI�B"��B"�5B�0B�1B�3B�	B�
B�B�B�B�B"c��UcUcUcgSupESupgSup�UR5n
Ucs[R"[R5nUcK[R"SS5upK[U5nU
R
U5 [R"U5 O�U[:XaA[R"SS5upE[U5[U5pTU
RXE45 OU[:Xa%[R"UR55nOP[U[5(a[R"U5nO$[R"UR!55nUR#U5nUcs[R"[R$5nUcK[R"SS5up�[U5nU
R
U5 [R"U5 O�U[:XaA[R"SS5upg[U5[U5pvU
RXg45 OU[:Xa%[R"UR55nOP[U[5(a[R"U5nO$[R"UR!55nUR#U5nUcs[R"[R&5n	U	cK[R"SS5up�[U	5n	U
R
U	5 [R"U5 O�U[:XaA[R"SS5up�[U5[U	5p�U
RX�45 O�U[(:XaUn	OU[:Xa%[R"UR55n	OP[U[5(a[R"U5n	O$[R"UR!55n	UR#U	5n	SSS5 XEXgX�4$!,(df   N=f)�dConstruct and return tuple with IO objects:
p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite
N)r�r�r�r�r�r��r�r�r)r�r��GetStdHandler�
CreatePiper�r�r�rr�rrg�
get_osfhandler�rVr��fileno�_make_inheritablerrr)rLrrZrKrr�r�r�r�r��
err_close_fds�_s            r?rf�Popen._get_handlesAsh���}���F�N�/� &��G� &��G� &��G��)�)�+�}��=�%�2�2�7�3K�3K�L�G���%,�%7�%7��a�%@�
��"(��/��%�,�,�W�5��+�+�A�.���d�]�(/�(:�(:�4��(C�%�G�(.�w����9I�X�!�(�(�'�)<�=��g�%�$�2�2�4�3D�3D�3F�G�G���s�+�+�$�2�2�5�9�G�%�2�2�5�<�<�>�B�G��0�0��9���>�&�3�3�G�4M�4M�N�H��'�&-�&8�&8��q�&A���#)�(�#3��%�,�,�X�6��+�+�A�.���t�^�(/�(:�(:�4��(C�%�G�(.�w����9I�X�!�(�(�'�)<�=��w�&�%�3�3�D�4E�4E�4G�H�H����,�,�%�3�3�F�;�H� &�3�3�F�M�M�O�D�H��1�1�(�;���>�&�3�3�G�4L�4L�M�H��'�&-�&8�&8��q�&A���#)�(�#3��%�,�,�X�6��+�+�A�.���t�^�(/�(:�(:�4��(C�%�G�(.�w����9I�X�!�(�(�'�)<�=��v�%�'�H��w�&�%�3�3�D�4E�4E�4G�H�H����,�,�%�3�3�F�;�H� &�3�3�F�M�M�O�D�H��1�1�(�;��{,�~���'�
'�,�+�s�PP5�5
Qc��[R"[R"5U[R"5SS[R5n[	U5$)z2Return a duplicate of handle, which is inheritablerr�)r��DuplicateHandle�GetCurrentProcess�DUPLICATE_SAME_ACCESSr�)rL�handle�hs   r?r��Popen._make_inheritable�sE���'�'��)�)�+�V��)�)�+�Q���-�-�/�A��!�9�r>c��[UVs1sH8nUS-S:wd*[R"U5[R:wdM6UiM: sn5$s snf)z�Filter out console handles that can't be used
in lpAttributeList["handle_list"] and make sure the list
isn't empty. This also removes duplicate handles.�)r}r��GetFileType�FILE_TYPE_CHAR)rLryr�s   r?�_filter_handle_list�Popen._filter_handle_list�sV���k�4�k�F�"�S�L�C�/�#�/�/��7�#�2�2�3� �k�4�5�
5��4s�5A�Ac��U(aS5e[U[5(aO}[U[5(aU
(a[S5e[	U/5nOI[U[
R5(aU
(a[S5e[	U/5nO[	U5nUb[
R"U5nUc[5nOUR5nSX�U4;nU(a6U=R[R-sl
X�l
X�lUUlUR n[#U=(a SU;=(a US5nU(dU(a�U(a�Uc	0=nUl[%UR'S/55=nUS'U(a#U[)U5[)U5[)U5/-
nUR+U5USS&U(a$U(d[,R."S[05 SnU
(GaU=R[R2-sl
[R4UlU(d�[
R8R'S	5nU(dp[
R8R'S
S5n[
R:R=USS
5n[
R:R?U5(d[AS5e[
R:R?U5(aUnOUnSRCUU5nUb[
R"U5n[DRF"SX!Xg5 [RH"X!SS[)U(+5U	UUU5	unnn n!URKX�X�UU5 SUl&[OU5Ul(U Ul)[RT"U5 g!URKX�X�UU5 f=f)z$Execute program (MS Windows version)z"pass_fds not supported on Windows.z$bytes args is not allowed on Windows�0path-like args is not allowed when shell is trueNr�ryz?startupinfo.lpAttributeList['handle_list'] overriding close_fdsF�ComSpec�
SystemRootr��System32zcmd.exez:shell not found: neither %ComSpec% nor %SystemRoot% is setz
{} /c "{}"�subprocess.PopenT)+rVr^�bytesrWr r5�PathLikerr+r|rrr�rrsrtrurwrZr}r�r�r�r�r�rXrrrv�environ�pathr�isabs�FileNotFoundErrorr�r��audit�
CreateProcessr�r�r��_handlerYr�)"rLr�rprqrrryrsrtrurvr#rr�r�r�r�r��unused_restore_signals�
unused_gid�unused_gids�
unused_uid�unused_umask�unused_start_new_session�unused_process_group�use_std_handles�attribute_list�have_handle_listry�comspec�system_root�hp�htrY�tids"                                  r?rl�Popen._execute_child�s;�� �E�!E�E�<��$��$�$���D�%�(�(��#�$J�K�K�#�T�F�+���D�"�+�+�.�.��#�%4�5�5�#�T�F�+��#�D�)���%��[�[��4�
��"�)�m��*�.�.�0�� ��H�(E�E�O���#�#�w�'C�'C�C�#�(/�%�)1�&�(0��%�(�8�8�N�#�N�%B�$1�^�$C�%B�$2�=�$A� C��
 �O�	�!�)�CE�E�N�[�%@���+�+�M�2�>�?�@��n�]�;�#��C��L�#�h�-��X��#O�O�K�!%�!9�!9�+�!F��A���$� �
�
�'=�>L�N�!&�I���#�#�w�'C�'C�C�#�*1�/�/��'�!�!�j�j�n�n�Y�7�G�"�&(�j�j�n�n�\�2�&F��"$�'�'�,�,�{�J�	�"R��!�w�w�}�}�W�5�5�"3�4p�"q�q��w�w�}�}�W�-�-�%,�
��(�G�#�*�*�G�T�:�����k�k�#�&���I�I�(�*�C�E�
8�#*�#8�#8��)-�t�),��]�);�)6�),�),�)4�$6� ��B��S��$�$�W�%,�%,�h�8�
#'�D��!�"�:�D�L��D�H�����#���$�$�W�%,�%,�h�8�s�0N9�9Oc��URc.U"URS5U:XaU"UR5UlUR$)z�Check if child process has terminated.  Returns returncode
attribute.

This method is called by __del__, so it can only refer to objects
in its local scope.

r)rHr�)rLr��_WaitForSingleObject�_WAIT_OBJECT_0�_GetExitCodeProcesss     r?r��Popen._internal_poll%s;�����&�'����a�8�N�J�&9�$�,�,�&G�D�O��?�?�"r>c�j�Uc[RnOUS::aSnO[US-5nURcp[R"UR
U5nU[R:Xa[URU5e[R"UR
5UlUR$)z-Internal implementation of wait() on Windows.ri�)
r��INFINITEr�rH�WaitForSingleObjectr��WAIT_TIMEOUTrr��GetExitCodeProcess)rLrh�timeout_millisrs    r?r��Popen._wait6s�����!(�!1�!1���A��!"��!$�W�t�^�!4�����&� �4�4�T�\�\�5C�E���W�1�1�1�(����G�<�<�")�"<�"<�T�\�\�"J����?�?�"r>c�b�URUR55 UR5 grG)r�r�rn)rL�fh�buffers   r?�
_readerthread�Popen._readerthreadHs���M�M�"�'�'�)�$��H�H�Jr>c�P�UR(a}[US5(dl/Ul[R"UR
URUR4S9UlSURlURR5 UR(a}[US5(dl/Ul
[R"UR
URUR4S9UlSURlURR5 UR(aURU5 URb_URRURU55 URR!5(a[#UR$U5eURb_URRURU55 URR!5(a[#UR$U5eSnSnUR(a&URnURR'5 UR(a&URnURR'5 U(aUSOSnU(aUSOSnXE4$)N�_stdout_buff)�targetr�T�_stderr_buffr)rZr2r rQ�Threadr�
stdout_thread�daemon�startrKr"�
stderr_threadrr�rr��is_aliverr�rn)rLr�r�r�rZrKs      r?r��Popen._communicateMs
���{�{�7�4��#@�#@�$&��!�!�(�(��0B�0B�/3�{�{�D�<M�<M�.N�P��"�-1��"�"�)��"�"�(�(�*��{�{�7�4��#@�#@�$&��!�!�(�(��0B�0B�/3�{�{�D�<M�<M�.N�P��"�-1��"�"�)��"�"�(�(�*��z�z��!�!�%�(�
�{�{�&��"�"�'�'��(<�(<�W�(E�F��%�%�.�.�0�0�(����L�A�A��{�{�&��"�"�'�'��(<�(<�W�(E�F��%�%�.�.�0�0�(����L�A�A��F��F��{�{��*�*�����!�!�#��{�{��*�*�����!�!�#�#)�V�A�Y�d�F�"(�V�A�Y�d�F��#�#r>c��URbgU[R:XaUR5 gU[R:Xa0[
R"UR[R5 gU[R:Xa0[
R"UR[R5 g[SRU55e)�Send a signal to the process.NzUnsupported signal: {})rHrR�SIGTERM�	terminate�CTRL_C_EVENTr5r�rY�CTRL_BREAK_EVENTrTr��rL�sigs  r?�send_signal�Popen.send_signals������*���f�n�n�$���� ���+�+�+�������&�"5�"5�6���/�/�/�������&�"9�"9�:� �!9�!@�!@��!E�F�Fr>c��URbg[R"URS5 g![a> [R
"UR5nU[R:XaeXlgf=f)zTerminates the process.Nr�)rHr��TerminateProcessr��PermissionErrorr�STILL_ACTIVE)rL�rcs  r?r-�Popen.terminate�se�����*��
%��(�(����q�9��"�
%��/�/����=����-�-�-��"$��

%�s�!2�AA:�9A:c��SupESupgSup�UR5n
UcO�U[:Xa[R"5upEU
R	XE45 UR
S:�aE[
[S5(a0[R"U[RUR
5 OCU[:XaUR5nO([U[5(aUnOUR5nUcO�U[:Xa[R"5upgU
R	Xg45 UR
S:�aE[
[S5(a0[R"U[RUR
5 OCU[:XaUR5nO([U[5(aUnOUR5nUcO�U[:Xa[R"5up�U
R	X�45 UR
S:�aE[
[S5(a0[R"U	[RUR
5 OuU[:Xa(US:waUn	Ob[R R5n	OCU[:XaUR5n	O([U[5(aUn	OUR5n	SSS5 XEXgX�4$!,(df   N=f)r�r�Nr�F_SETPIPE_SZr�)r�rr5�piper�rDr2�fcntlr;rr�rVr�r�rr��
__stdout__)rLrrZrKrr�r�r�r�r�r�s           r?rfr��s8��!'��G� &��G� &��G��)�)�+�}��=���d�]�(*���	�%�G�!�(�(�'�)<�=��}�}�q�(�W�U�N�-K�-K����H�e�.@�.@�$�-�-�P���g�%�"�/�/�1�G���s�+�+�#�G�$�l�l�n�G��>���t�^�(*���	�%�G�!�(�(�'�)<�=��}�}�q�(�W�U�N�-K�-K����H�e�.@�.@�$�-�-�P���w�&�#�0�0�2�H����,�,�%�H� &�}�}��H��>���t�^�(*���	�%�G�!�(�(�'�)<�=��}�}�q�(�W�U�N�-K�-K����H�e�.@�.@�$�-�-�P���v�%��2�~�#+��#&�>�>�#8�#8�#:���w�&�#�0�0�2�H����,�,�%�H� &�}�}��H�c,�f���'�
'�g,�+�s�J#K
�
Kc�B�0nU(a6/n
SH*n[[US5nUcMU
RU5 M, X�S'/nXxU
4H,nUS:wdMUR[RU45 M. US4U	S4US44H0unnUS:wdMUR[R
UU45 M2 U(a!UR[RS45 U(aUUS	'[R"X!U40UD6UlS
Ul	URXgX�X�5 g)z'Execute program using os.posix_spawn().)�SIGPIPE�SIGXFZ�SIGXFSZN�	setsigdefr�rr�r�r��file_actionsT)r�rRr�r5�POSIX_SPAWN_CLOSE�POSIX_SPAWN_DUP2r>r*rYr�r�)rLr�rprtrwrrrr�r�r�r�r�r��sigset�signame�signumrDr��fd2s                   r?�_posix_spawn�Popen._posix_spawn�s%��
�F����?�G�$�V�W�d�;�F��)��
�
�f�-� @�'-�{�#��L��'�2����8� �'�'��)=�)=�r�(B�C�3��!���1�
��1�
����C�
��8� �'�'��)<�)<�b�#�(F�G�
���#�#�R�%=�%=�q�$A�B��)5��~�&��~�~�j��F�v�F�D�H�"&�D��� � ��!(�!(�
4r>c�l
^�[U[[45(aU/nO@[U[R5(aU
(a[S5eU/nO[
U5nU
(a,[[S5(aSOSnUS/U-nT(aTUS'TcUSm[R"STXU5 [(a�[RRT5(ayUcvU(a[(adU(d]UcZUS	:XdUS
:�aNUS	:XdUS
:�aBUS	:XdUS
:�a6U(d/US	:Xa)Uc&Uc#Uc US:aURUTUUUX�X�UU5 gTn[R"5unn/nUS:a/UR!U5 [R""U5nUS:aM/UHn[R$"U5 M Ubo/nUR'5HXunn [R("U5nSU;a[+S
5eUR!US-[R("U 5-5 MZ OSn[R("T5m[RRT5(aT4n!O)[-U4Sj[R."U555n![1U5n"U"R3U5 [5UU!U[-[7[9[:U"555UUX�X�UUUUUUUUUUUU[<5UlSUl [R$"U5 URCX�X�UU5 [E5n#[RF"US5n$U#U$-
n#U$(a[IU#5S:�aOM5[R$"U5 U#(Ga"[RJ"UR>S5un%n&U%UR>:XaURMU&5 O[RNUl(U#RUSS
5un'n(n)U)RW5n)[[[\U'RWS5[^5n*[aU*[b5(a]U((aV[;U(S5n+U)S:XaSn)Un,O
U)S:XaSn)Sn,OUn,U+S:wa[Rd"U+5n)U,b
U*"U+U)U,5eU*"U+U)5eU*"U)5eg![R$"U5 f=f![R$"U5 f=f![Ra GN	f=f![*a" Sn'Sn(SRY[U#55n)GNf=f)zExecute program (POSIX version)r��getandroidapilevelz/system/bin/shz/bin/shz-crNr�r�r�r��=z!illegal environment variable namec3�># �UH9n[RR[R"U5T5v� M; g7frG)r5r�r�fsencode)�.0�dirrps  �r?�	<genexpr>�'Popen._execute_child.<locals>.<genexpr>cs3����0>�'<���G�G�L�L����S�)9�:�F�F�'<�s�AATiP��:sSubprocessError�0z#Bad exception data from child: {!r}�ascii�znoexec:chdirr��noexec)3rVr^r�r5r�rWr}r2r�r��_USE_POSIX_SPAWNr��dirname�_HAVE_POSIX_SPAWN_CLOSEFROMrKr<r��duprnr�rQrTr6�
get_exec_path�set�add�
_fork_exec�sortedrr��
_USE_VFORKrYr�r��	bytearrayr�rr6�_handle_exitstatusr�rH�ChildProcessErrorr5r�r�r��builtinsr�
issubclassr8�strerror)-rLr�rprqrrryrsrtrurvr#rr�r�r�r�r�rwrzr{r~rCrxrE�
unix_shell�orig_executable�errpipe_read�
errpipe_write�low_fds_to_close�low_fd�env_list�kr��executable_list�fds_to_keep�errpipe_data�partrYr��exception_name�	hex_errno�err_msg�child_exception_type�	errno_num�err_filenames-  `                                          r?rlr

s�����$��e��-�-��v���D�"�+�+�.�.��#�%4�5�5��v���D�z���"�#�';�<�<�/�BK��"�D�)�D�0���(�D��G��!�!�!�W�
��I�I�(�*�d��E� � ������
�3�3�"�*�&�*E�*E�$��� �B��'�A�+�!�R��8�a�<�!�R��8�a�<�-�%��+���������	��!�!�$�
�C��)�")�")�")�8�5��(�O�
+-�'�'�)�'�L�-�!���!�#� �'�'�
�6� "���}� 5�
� �!�#�+������ �+�7
'�&,���#%��$'�I�I�K�D�A�q� "���A��A�#�q�y�&0�1T�&U� U�$�O�O�A��H�r�{�{�1�~�,E�F�	%0�$(��!#���Z�!8�J��w�w���z�2�2�+5�-��+0�0>�')�'7�'7��'<�0>�+>��#&�h�-�K��O�O�M�2�)� �/�%�u�V�C��[�4I�-J�'K���#�w�#�X�(�-�+�->�)�3��c�5�&�
�	 4�D�H�+/�D�'��H�H�]�+��$�$�W�%,�%,�h�8� )�{����7�7�<��7�D� �D�(�L��3�|�#4�u�#<��	�����&���!�z�z�$�(�(�A�6�H�C���d�h�h���/�/��4�*-�+�+���7�(�.�.�t�Q�7�7�N�I�w�
&�n�n�.�G�(/� �.�"7�"7��"@�'�()�$��2�G�<�<�� #�I�r� 2�I��.�0�"$��'*�� �H�,�"$��'+��'6�� �A�~�"$�+�+�i�"8��#�/�2�9�g�|�T�T�2�9�g�F�F�*�7�3�3�U��%�H�H�]�+�� ����&��)�����"�7�%7�N� $�I�C�J�J�"'��"5�7�G�7�sK�ES�A*S�AS6�$S6�;&T�S�S�S3�6
T�T�(T3�2T3c��URU5(aURU5*UlgURU5Ulg)�:All callers to this function MUST hold self._waitpid_lock.N)r8r9rHr7)rLr�r.s   r?rf�Popen._handle_exitstatus�s<���#�#�C�(�(�#,�#5�#5�c�#:�":���"+�"B�"B�3�"G��r>c��URc�URRS5(dgURb&URURR5 $UR	UR
UR5up4X0R
:XaURU5 URR5 UR$UR$![a9nUbXlSnANJURUR:XaSUlSnANpSnAff=f!URR5 f=f)z�Check if child process has terminated.  Returns returncode
attribute.

This method is called by __del__, so it cannot reference anything
outside of the local scope (nor can any methods it calls).

NFr)rHrS�acquire�releaser6rYr:rfr8r;r<)rLr�r.rYr��es      r?r�r�s�����&��)�)�1�1�%�8�8� �1����2�#����&�&�.�.�0� )�0�0����9�;L�;L�M�H�C��h�h���/�/��4��&�&�.�.�0��?�?�"�4�?�?�"���	,�!�-�*4������I�$4�$4�4�+,�����	,���&�&�.�.�0�s<�C�#AC�
D �'	D�0D#�5!D�D#�D � D#�#D?c��[R"URU5up#X#4$![a URnSnX#4$f=f)r~r)r5r6rYrg)rL�
wait_flagsrYr�s    r?�	_try_wait�Popen._try_wait�sP��
��Z�Z����*�=�
���:���
%�
��h�h�����:��

�s�#(�A�Ac�j�URbUR$UGbU[5U-nSnURRS5(a�URb'URR	5 UR$UR[R5upEX@R:XdUS:XdeX@R:Xa8URU5 URR	5 UR$URR	5 URU5nUS::a[URU5e[US-US5n[R"U5 GMEURcyUR URbSSS5 UR$URS5upEX@R:XaURU5 SSS5 URcMyUR$!URR	5 f=f!,(df   NH=f)z+Internal implementation of wait() on POSIX.Ng����Mb@?Frr�g�������?)rHr�rSr�r�r�r5r:rYrfr�rr�r��time�sleep)rLrhr��delayrYr��	remainings       r?r�r�s������*����&��"��'�G�+������)�)�1�1�%�8�8�	9�#���:� %�!�.�.�6�6�8�"�?�?�"�/*.����
�
�)C�J�S�#&�(�(�?�c�Q�h�>�#>�"�h�h�� $� 7� 7�� <� %� �.�.�6�6�8�"�?�?�"�+ /�!�.�.�6�6�8� $� 4� 4�W� =�I� �A�~�,�T�Y�Y��@�@����	�9�c�:�E��J�J�u�%�!�$�o�o�-��+�+��?�?�6�!�,��?�?�"�
&*�^�^�A�%6�
���(�(�?� �3�3�C�8�,��o�o�-��?�?�"��#!�.�.�6�6�8��,�+�s%�
H�AH�H$�/3H$�H!�$
H2c	�p�UR(aNUR(d=URR5 U(dURR	5 SnSnUR(d[0UlUR(a/UR
UR'UR(a/UR
UR'UR(aUR
URnUR(aUR
URnURU5 UR(a[UR5n[5nUR(a1U(a*URUR[R5 UR(aEURR(d*URUR[R 5 UR(aEURR(d*URUR[R 5 UR#5(Ga�UR%U5nUb"US:aUR'X#XESS9 [)S5eUR+U5n	UR'X#XE5 U	GH}up�U
R,URLa�WUR.UR.[0-nU=R.[2R4"U
R6U5-
slUR.[9UR5:�a7UR;U
R,5 U
R,R	5 M�M�U
R,URUR4;dM�[2R<"U
R6S5n
U
(d5UR;U
R,5 U
R,R	5 UR
U
R,R?U
5 GM� UR#5(aGM�SSS5 URAUR%U5S9 UbSRCU5nUbSRCU5nURD(a|Ub;URGUURRHURRJ5nUb;URGUURRHURRJ5nXE4$![a GNf=f![a GN�f=f![a: UR;U
R,5 U
R,R	5 GM�f=f!,(df   GNN=f)NrT)r�zN_check_timeout(..., skip_check_and_raise=True) failed to raise TimeoutExpired.i�r�r>)&rrU�flushr�rn�_fileobj2outputrZrK�_save_inputrT�
memoryview�_PopenSelector�register�	selectors�EVENT_WRITEr��
EVENT_READ�get_mapr�r��RuntimeError�select�fileobj�
_input_offset�	_PIPE_BUFr5r�r�r�
unregisterr�r�r�rr[r�r�r�)rLr�r�r�rZrK�
input_view�selectorrh�ready�key�events�chunkr%s              r?r�r)sC���z�z�$�"=�"=���J�J�$�$�&����
�
�(�(�*��F��F��.�.�')��$��;�;�8:�D�(�(����5��;�;�8:�D�(�(����5��{�{��-�-�d�k�k�:���{�{��-�-�d�k�k�:�����U�#��{�{�'����4�
��!�X��:�:�%��%�%�d�j�j�)�2G�2G�H��;�;�t�{�{�'9�'9��%�%�d�k�k�9�3G�3G�H��;�;�t�{�{�'9�'9��%�%�d�k�k�9�3G�3G�H��&�&�(�(�"�2�2�7�;�G��*�w��{��+�+�G�,2�AE�,�G�+�>�?�?�%�O�O�G�4�E��'�'��v�N�
(-����;�;�$�*�*�4�$.�t�/A�/A�/3�/A�/A�I�/M�%O�E�8� $� 2� 2�b�h�h�s�v�v�u�6M� M� 2�
$(�#5�#5��T�[�[�9I�#I�$,�$7�$7����$D�$'�K�K�$5�$5�$7�$J�!�[�[�T�[�[�$�+�+�,F�F�#%�7�7�3�6�6�5�#9�D�#'� (� 3� 3�C�K�K� @� #��� 1� 1� 3� �0�0����=�D�D�T�J�%(-�!�&�&�(�(�"�X
�I�I�d�2�2�7�;�I�<��!����&�)���!����&�)���~�~��%�!�5�5�f�6:�k�k�6J�6J�6:�k�k�6H�6H�J�F��%�!�5�5�f�6:�k�k�6J�6J�6:�k�k�6H�6H�J�F��#�#��{'�����
+�����l$3�4� (� 3� 3�C�K�K� @� #��� 1� 1� 3� 3�4��="�!�s\�T=�U�%FV&�4U�9BV&�=BV&�=
U�
U�
U�U�?V#�V&�"V#�#V&�&
V5c��UR(a{URcmSUlXlUb\UR(aJURR	URR
URR5Ulggggg)Nr)rrTr�r[�encoder�r�)rLr�s  r?r��Popen._save_input{sl���z�z�d�k�k�1�%&��"�#���$����"&�+�+�"4�"4�T�Z�Z�5H�5H�59�Z�Z�5F�5F�#H�D�K�*8�$�2�zr>c��UR5 URbg[R"URU5 g![
a gf=f)r+N)rrHr5r�rY�ProcessLookupErrorr0s  r?r2r3�sC��$
�I�I�K����*��

�������#�&��%�
��
�s�!A�
A�Ac�B�UR[R5 g)z/Terminate the process with SIGTERM
            N)r2rRr,rUs r?r-r9����
���V�^�^�,r>c�B�UR[R5 g)z*Kill the process with SIGKILL
            N)r2rR�SIGKILLrUs r?r��
Popen.kill�r�r>)r�r]rUrNr�r�rTr�r\r"r rSr�r�r�rYrDrHrKr'rrZr$r[)r�NNNNNTFNNNNrTFr0r`)FrG)8r1r2r3r4rbr�rMr�rrrr	rcr�rdr�r�r�r�r�r�r�r�r�r�rrr�r�r�r�r��contextmanagerr�rrfr�r�rlr�r�
WAIT_OBJECT_0rr�r�rr�r2r-r�rKr.rfr�r�r=r0r>r?rr�s���6�n�N�48�15�,0�EI�12�9>��
B�'+�$�T��t�$�b�2�#�B�H�$�E�$6�$6�7��
����
���2��2�>���8 #�{�{�(�-�-�
!��
�2A �H%�%�-2�	I��.+�:������&�L	'�^	�
	5�}	$�~-1�%,�%@�%@�&�4�4�$+�$>�$>�	#�"	#�$	�
0	$�d	G�
	%���=	'�@&	4�Pg	4�T5>�	H�-1�I�	#�D
	�&	#�Rc	$�L		H�	�@	-�
	-r>r)Vrbrhr;rir�r5r�rRr�rQr�r�rr�rr=r`�__all__rgr�ModuleNotFoundErrorr3rOr�rrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r��_posixsubprocessr,rbr.r�r��	Exceptionrr
rr+r�r�r�r�r2r�r��SelectSelectorr�r�rrrr�r�r�rrr�objectrrr r	r
r=r[rdr]rr0r>r?�<module>r�s/�� �D��	�
�	��
�
����#����
D�����J����%U�U��
��	O�	O�	O�	O�	O�	O��N�N�
N�
O��<�	"�	"�	"�	"���'�i�&�"��"�J�_��8�:�:�.���,��
�C�0�I�
�y�.�)�)�"�/�/��"�1�1����G�
��G��
��	��
���:�z$�("��"
�&&*�2 �j!2�v�!2�J�5�$�e�CC�LC�R&*�$��@ $�D�
E�-�d$�%��
�
�%�b�*A�B��{-�{-��s���E������J��s#�F6�G�6G�G�G�G
© 2025 GrazzMean-Shell