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__/test_fork1.cpython-310.pyc
o

�9j��@s�dZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
ddlmZe�
ed�Gdd�de
�Zdd	�Zed
krFe��dSdS)z.This test checks for correct fork() behavior.
�N)�ForkWait)�support�forkc@seZdZdd�Zdd�ZdS)�ForkTestcs�t���d�d�d�����fdd�}tj|d�}|�����d}t��}z@|sGt��}|�kr8t�|�nt	j
dkrAtd	�t�d�n|��|j
||d
�Wz
t�|tj�WdStygYdSwz	t�|tj�WwtyzYww)zFCheck fork() in main thread works while a subthread is doing an importzfake test module�partial�completecs:t���tj�<���t�d��tj�<t��dS)Ng{�G�z�?)�imp�acquire_lock�sys�modules�set�time�sleep�release_lock���complete_module�fake_module_name�import_started�partial_moduler�&/usr/lib/python3.10/test/test_fork1.py�importers


z9ForkTest.test_threaded_import_lock_fork.<locals>.importer)�target�*�z Child encountered partial module��exitcodeN)�	threading�Event�Thread�start�wait�osr�
__import__�_exitr�verbose�print�join�	wait_impl�kill�signal�SIGKILL�OSError)�selfr�tr�pid�mrrr�test_threaded_import_lock_forks>
����z'ForkTest.test_threaded_import_lock_forkcs,d���fdd�}td�D]}||�q
dS)zJCheck fork() in main thread works while the main thread is doing an importrc	s�d}d}z2z#t|�D]
}t��|d7}q
t��}|}Wt|�D]}t��q!nt|�D]}t��q-wWntyN|rMtjdkrHt	d�t�
d��w|rVt�
���j|�d�dS)NrFrzRuntimeError in childr)�rangerr	r"rr�RuntimeErrorrr%r&r$r()�level�release�in_child�ir/�rr-rr�fork_with_import_lockCs0

�
�

�
zDForkTest.test_nested_import_lock_fork.<locals>.fork_with_import_lock�N)r2)r-r9r4rr8r�test_nested_import_lock_fork?s

�z%ForkTest.test_nested_import_lock_forkN)�__name__�
__module__�__qualname__r1r;rrrrrs+rcCst��dS)N)r�
reap_childrenrrrr�tearDownModule`sr@�__main__)�__doc__�_imprr"r*r
rr
�unittest�test.fork_waitr�testr�
get_attributerr@r<�mainrrrr�<module>s M�

Youez - 2016 - github.com/yon3zu
LinuXploit