Uname:Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64

403WebShell
403Webshell
Server IP : 3.111.61.48  /  Your IP : 216.73.216.67
Web Server : Apache
System : Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.2.31
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3.10/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3.10/test/__pycache__/fork_wait.cpython-310.pyc
o

�9j��@sfdZddlZddlZddlZddlZddlZddlmZddlm	Z	dZ
dZdZGdd	�d	ej
�ZdS)
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@s4eZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�ForkWaitcCs t��|_i|_d|_g|_dS)Nr)r�threading_setup�_threading_key�alive�stop�threads)�self�r
�%/usr/lib/python3.10/test/fork_wait.py�setUps

zForkWait.setUpcCs8d|_|jD]}|��qd}|j��tj|j�dS)N�)r
r�join�clearr�threading_cleanupr)r�threadr
r
r�tearDowns


zForkWait.tearDowncCsD|js t��|j|<zt�t�Wn	tyYnw|jrdSdS)N)r
�os�getpidr	�time�sleep�
SHORTSLEEP�OSError)r�idr
r
r�f's��z
ForkWait.fcCstj||d�dS)N��exitcode)r�wait_process)r�cpidrr
r
r�	wait_impl/szForkWait.wait_implc	Cstt�D]}tj|j|fd�}|��|j�|�qt�	�t
j}t|j
�tkr;t�d�|t�	�kr4nt|j
�tks(t|j
���}|�|ttt���|j
��}tjdvr[t��}nt��}|dkr�t�t�d}|j
D]}|j
|||kr||d7}qmt�|�dS|j|dd�dS)N)�target�argsg�������?)�	unixware7rrr)�range�NUM_THREADS�	threading�Threadr�startr�appendr�	monotonicr�
SHORT_TIMEOUT�lenr	r�sorted�keys�assertEqual�list�copy�sys�platformr�fork1�fork�	LONGSLEEP�_exitr")	r�ir�deadline�a�
prefork_livesr!�n�keyr
r
r�	test_wait2s2
�




�zForkWait.test_waitN)�__name__�
__module__�__qualname__rrrr"r@r
r
r
rrs	r)�__doc__rr4r�unittestr(�testr�test.supportrr8rr'�TestCaserr
r
r
r�<module>s 

Youez - 2016 - github.com/yon3zu
LinuXploit