|
Server : LiteSpeed System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64 User : nandedex ( 1060) PHP Version : 8.1.33 Disable Function : NONE Directory : /opt/cppython/lib/python3.8/test/__pycache__/ |
U
>��g� � @ s� d Z ddlZddlZddlZddlZddlZddlZddlZddl m
Z
ddlmZm
Z
mZ e
ed� G dd� de
�Zdd � Zed
kr�e�� dS )z.This test checks for correct fork() behavior.
� N)�ForkWait)�
reap_children�
get_attribute�verbose�forkc @ s$ e Zd Zdd� Zdd� Zdd� ZdS )�ForkTestc C sn t �� d }t �� |kr@t�|tj�\}}||kr4q@t �d� q| �||� | �|dd|d@ |d? f � d S )Ng $@g�������?r zcause = %d, exit = %d� � )�time� monotonic�os�waitpid�WNOHANG�sleepZassertEqual)�selfZcpid�deadlineZspid�status� r �./opt/cppython/lib/python3.8/test/test_fork1.py� wait_impl s zForkTest.wait_implc s� t �� �d�d�d� � ���fdd�}t j|d�}|�� ��� t�� }zR|s�t��}|� krlt�d� q�t
dkr|td � t�d� n|�� | �|� W 5 zt�|tj � W n t
k
r� Y nX X d
S )zFCheck fork() in main thread works while a subthread is doing an importzfake test module�partialZcompletec s: t �� �tj�<