403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.202
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python312/Lib/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python312/Lib/test/__pycache__/fork_wait.cpython-312.opt-1.pyc
�

���g}	��~�dZddlZddlZddlZddlZddlmZddlmZddl	Z	dZ
dZdZGd�d	ej�Zy)
arThis test case provides support for checking forking and wait behavior.

To test different wait behavior, override the wait_impl method.

We want fork1() semantics -- only the forking thread survives in the
child after a fork().

On some systems (e.g. Solaris without posix threads) we find that all
active threads survive in the child after a fork(); this is an error.
�N)�support)�threading_helper�g�?�c�*�eZdZd�Zd�Zd�Zd�Zd�Zy)�ForkWaitc�`�tj�|_i|_d|_g|_y)Nr)r�threading_setup�_threading_key�alive�stop�threads)�selfs �#C:\Python312\\Lib\test\fork_wait.py�setUpzForkWait.setUps(��.�>�>�@�����
���	����c���d|_|jD]}|j��d}|jj�t	j
|j�y)N�)r
r�join�clearr�threading_cleanupr)r�threads  r�tearDownzForkWait.tearDownsI����	��l�l�F��K�K�M�#����������*�*�D�,?�,?�@rc���|jsItj�|j|<	t	j
t�|js�Hyy#t$rY�wxYw)N)r
�os�getpidr�time�sleep�
SHORTSLEEP�OSError)r�ids  r�fz
ForkWait.f(sJ���)�)��Y�Y�[�D�J�J�r�N�
��
�
�:�&��)�)���
��
�s�A�	A#�"A#c�2�tj||��y)N��exitcode)r�wait_process)r�cpidr%s   r�	wait_implzForkWait.wait_impl0s�����T�H�5rc��tt�D]O}tj|j|f��}|j�|jj|��Qtjtj�D] }t|j�tk\s� nt|jj��}|j|t!tt���|jj#�}t%j&t(d��5t+j,�x}dk(r]t/j0t2�d}|jD]}|j|||k7s�|dz
}�t+j4|�n|j7|d��ddd�y#1swYyxYw)N)�target�args�ignore)�category�actionrrr$)�range�NUM_THREADS�	threading�Threadr"�startr�appendr�sleeping_retry�
SHORT_TIMEOUT�lenr�sorted�keys�assertEqual�list�copy�warnings�catch_warnings�DeprecationWarningr�forkrr�	LONGSLEEP�_exitr()	r�ir�_�a�
prefork_livesr'�n�keys	         r�	test_waitzForkWait.test_wait3sJ���{�#�A��%�%�T�V�V�1�$�?�F��L�L�N��L�L����'�$��'�'��(=�(=�>�A��4�:�:��+�-��?�
�4�:�:�?�?�$�%������D��{�!3�4�5��
�
���)�
��
$�
$�.@�,4�6����	�!��a�'��
�
�9�%����:�:�C��z�z�#��-��*<�<��Q���&���������t�a��0�6�6�6�s�(AF;�0F;�;GN)�__name__�
__module__�__qualname__rrr"r(rI�rrrrs���A��6�1rr)�__doc__rr�unittestr1�testr�test.supportrr=rArr0�TestCaserrMrr�<module>rSsA��	�����)��
�	�
�
���91�x� � �91r

Youez - 2016 - github.com/yon3zu
LinuXploit