403Webshell
Server IP : 118.27.122.248  /  Your IP : 216.73.216.124
Web Server : Apache
System : Linux web0264.sh.tyo1 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64
User : c9415830 ( 11735)
PHP Version : 8.4.17
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/python36/lib64/python3.6/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python36/lib64/python3.6/test/__pycache__/test_fork1.cpython-36.pyc
3

�w2_��@s�dZddlZddlZddlZddlZddlZddlZddlm	Z	ddl
mZmZm
Z
mZe
d�Zeed�Gdd�de	�Zd	d
�Zedkr�ej�dS)z.This test checks for correct fork() behavior.
�N)�ForkWait)�
reap_children�
get_attribute�
import_module�verbose�	threading�forkc@s$eZdZdd�Zdd�Zdd�ZdS)�ForkTestcCsrtj�d}x6tj�|krBtj|tj�\}}||kr6Ptjd�qW|j||�|j|dd|d@|d?f�dS)Ng$@g�������?rzcause = %d, exit = %d��)�timeZ	monotonic�os�waitpid�WNOHANG�sleepZassertEqual)�selfZcpidZdeadlineZspidZstatus�r�4/opt/alt/python36/lib64/python3.6/test/test_fork1.py�	wait_implszForkTest.wait_implcs�tj��d�d�d�����fdd�}tj|d�}|j��j�tj�}zR|s�t��}|�krltjd�q�t	dkr|t
d	�tjd�n|j�|j|�Wd
ytj
|tj�Wntk
r�YnXXd
S)zFCheck fork() in main thread works while a subthread is doing an importzfake test module�partialZcompletecs:tj��tj�<�j�tjd��tj�<tj�dS)Ng{�G�z�?)�imp�acquire_lock�sys�modules�setrr�release_lockr)�complete_module�fake_module_name�import_started�partial_modulerr�importer(s


z9ForkTest.test_threaded_import_lock_fork.<locals>.importer)�targetr�z Child encountered partial moduleN)rZEventZThread�start�waitr
r�
__import__�_exitr�print�joinr�kill�signal�SIGKILL�OSError)rr �t�pid�mr)rrrrr�test_threaded_import_lock_fork"s.z'ForkTest.test_threaded_import_lock_forkcs*�fdd�}xtd�D]}||�qWdS)zJCheck fork() in main thread works while the main thread is doing an importcs�d}d}yVz4x t|�D]}tj�|d7}qWtj�}|}Wdxt|�D]}tj�qJWXWn4tk
r�|r�tdkr�td�tj	d��YnX|r�tj	d��j
|�dS)NrFr"zRuntimeError in child)�rangerrr
rr�RuntimeErrorrr'r&r)�level�releaseZin_child�ir.)rrr�fork_with_import_lockOs(


zDForkTest.test_nested_import_lock_fork.<locals>.fork_with_import_lock�N)r1)rr6r3r)rr�test_nested_import_lock_forkLsz%ForkTest.test_nested_import_lock_forkN)�__name__�
__module__�__qualname__rr0r8rrrrr	s
*r	cCs
t�dS)N)rrrrr�tearDownModulelsr<�__main__)�__doc__�_imprr
r*rrZunittestZtest.fork_waitrZtest.supportrrrrrr	r<r9�mainrrrr�<module>s
X

Youez - 2016 - github.com/yon3zu
LinuXploit