Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 18.119.108.80
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : fork_wait.pyo
�
>��cc@s�dZddlZddlZddlZddlZddljZejd�ZdZ	dZ
dZdejfd��YZ
dS(	s�This 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.

While BeOS doesn't officially support fork and native threading in
the same application, the present example should work just fine.  DC
i����Nt	threadingig�?itForkWaitcBs5eZd�Zd�Zd�Zd�Zd�ZRS(cCs.tj�|_i|_d|_g|_dS(Ni(tsupporttthreading_setupt_threading_keytalivetstoptthreads(tself((s5/usr/local/python-2.7/lib/python2.7/test/fork_wait.pytsetUps		cCsHd|_x|jD]}|j�qWd}|j2tj|j�dS(Ni(RRtjointNoneRtthreading_cleanupR(Rtthread((s5/usr/local/python-2.7/lib/python2.7/test/fork_wait.pyttearDown s	cCsLxE|jsGtj�|j|<ytjt�Wqtk
rCqXqWdS(N(RtostgetpidRttimetsleept
SHORTSLEEPtIOError(Rtid((s5/usr/local/python-2.7/lib/python2.7/test/fork_wait.pytf)s
cCs�xPtd�D]B}tj|tj�\}}||kr>Pntjdt�q
W|j||�|j|dd|d@|d?f�dS(Ni
iiscause = %d, exit = %di�i(trangeRtwaitpidtWNOHANGRRRtassertEqual(Rtcpidtitspidtstatus((s5/usr/local/python-2.7/lib/python2.7/test/fork_wait.pyt	wait_impl1scCs<xLtt�D]>}tjd|jd|f�}|j�|jj|�q
Wtj	t
�|jj�}|j
�|j|tt��|jj�}tjdkr�tj�}ntj�}|dkr+tj	t
�d}x5|jD]*}|j|||kr�|d7}q�q�Wtj|�n
|j|�dS(Nttargettargst	unixware7ii(R"(RtNUM_THREADSRtThreadRtstartRtappendRRt	LONGSLEEPRtkeystsortRtcopytsystplatformRtfork1tforkt_exitR(RRR
tat
prefork_livesRtntkey((s5/usr/local/python-2.7/lib/python2.7/test/fork_wait.pyt	test_wait=s(



(t__name__t
__module__R	RRRR4(((s5/usr/local/python-2.7/lib/python2.7/test/fork_wait.pyRs
					(t__doc__RR+Rtunittestttest.supportRt
import_moduleRR'RR#tTestCaseR(((s5/usr/local/python-2.7/lib/python2.7/test/fork_wait.pyt<module>
s0
© 2025 GrazzMean