HEX
Server: Apache
System: Linux bd12.noc223.com 4.18.0-553.121.1.lve.el8.x86_64 #1 SMP Thu Apr 30 16:40:41 UTC 2026 x86_64
User: handcraf (1693)
PHP: 8.1.28
Disabled: NONE
Upload Files
File: //opt/alt/python312/lib64/python3.12/test/__pycache__/fork_wait.cpython-312.opt-2.pyc
�

h�e-	��|�	ddlZddlZddlZddlZddlmZddlmZddlZdZ	dZ
dZGd�dej�Z
y)	�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 �5/opt/alt/python312/lib64/python3.12/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.tearDownsN����	��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_wait3s^���{�#�	(�A��%�%�T�V�V�1�$�?�F��L�L�N��L�L����'�	(��'�'��(=�(=�>�	�A��4�:�:��+�-��	�
�4�:�:�?�?�$�%������D��{�!3�4�5��
�
���)�
��
$�
$�.@�,4�6�	1����	�!��a�'��
�
�9�%����:�:��C��z�z�#��-��*<�<��Q������������t�a��0�	1�	1�	1�s�(AF;�0F;�;GN)�__name__�
__module__�__qualname__rrr"r(rI�rrrrs���A��6�1rr)rr�unittestr1�testr�test.supportrr=rArr0�TestCaserrMrr�<module>rRsA��	�����)��
�	�
�
���91�x� � �91r