Your IP : 216.73.216.213


Current Path : /opt/alt/python33/lib64/python3.3/test/__pycache__/
Upload File :
Current File : //opt/alt/python33/lib64/python3.3/test/__pycache__/fork_wait.cpython-33.pyo

�
��fhc@s�dZddlZddlZddlZddlZddljZejd�ZdZ	dZ
dZGdd�dej�Z
dS(	urThis 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.
iNu_threadig�?icBsM|EeZdZdd�Zdd�Zdd�Zejdd��Zd	S(
uForkWaitcCsi|_d|_dS(Ni(ualiveustop(uself((u3/opt/alt/python33/lib64/python3.3/test/fork_wait.pyusetUps	uForkWait.setUpcCsMxF|jsHtj�|j|<ytjt�Wqtk
rDYqXqWdS(N(ustopuosugetpidualiveutimeusleepu
SHORTSLEEPuIOError(uselfuid((u3/opt/alt/python33/lib64/python3.3/test/fork_wait.pyufs
u
ForkWait.fcCs�xPtd�D]B}tj|tj�\}}||kr>Pntjdt�q
W|j||�|j|dd|d@|d?f�dS(Ni
iiucause = %d, exit = %di�i(urangeuosuwaitpiduWNOHANGutimeusleepu
SHORTSLEEPuassertEqual(uselfucpiduiuspidustatus((u3/opt/alt/python33/lib64/python3.3/test/fork_wait.pyu	wait_impl"suForkWait.wait_implcCs-x*tt�D]}tj|j|f�q
Wtjt�t|j	j
��}|j|ttt���|j	j
�}tjdkr�tj�}ntj�}|dkrtjt�d}x5|j	D]*}|j	|||kr�|d7}q�q�Wtj|�nz|j|�Wdd|_XdS(Nu	unixware7ii(u	unixware7(urangeuNUM_THREADSu_threadu	start_newufutimeusleepu	LONGSLEEPusortedualiveukeysuassertEqualulistucopyusysuplatformuosufork1uforku_exitu	wait_implustop(uselfuiuau
prefork_livesucpidunukey((u3/opt/alt/python33/lib64/python3.3/test/fork_wait.pyu	test_wait.s&

uForkWait.test_waitN(	u__name__u
__module__u__qualname__usetUpufu	wait_implusupportureap_threadsu	test_wait(u
__locals__((u3/opt/alt/python33/lib64/python3.3/test/fork_wait.pyuForkWaitsuForkWait(u__doc__uosusysutimeuunittestutest.supportusupportu
import_moduleu_threadu	LONGSLEEPu
SHORTSLEEPuNUM_THREADSuTestCaseuForkWait(((u3/opt/alt/python33/lib64/python3.3/test/fork_wait.pyu<module>
s0