B
    18™\ž  ã               @   s€   d Z ddlZddlZddlZddlZddlmZ ddlmZm	Z	 e	edƒ e	edƒ G dd„ deƒZ
d	d
„ Zedkr|e ¡  dS )z/This test checks for correct wait4() behavior.
é    N)ÚForkWait)Úreap_childrenÚget_attributeÚforkÚwait4c               @   s   e Zd Zdd„ ZdS )Ú	Wait4Testc             C   s’   t j}tj d¡rd}t ¡ d }x6t ¡ |krXt  ||¡\}}}||krLP t d¡ q$W |  	||¡ |  	|dd|d@ |d? f ¡ |  
|¡ d S )NÚaixr   g      $@gš™™™™™¹?zcause = %d, exit = %déÿ   é   )ÚosÚWNOHANGÚsysÚplatformÚ
startswithÚtimeÚ	monotonicr   ÚsleepÚassertEqualÚ
assertTrue)ÚselfZcpidÚoptionÚdeadlineZspidÚstatusZrusage© r   úS/oak/stanford/groups/akundaje/marinovg/programs/Python-3.7.3/Lib/test/test_wait4.pyÚ	wait_impl   s    zWait4Test.wait_implN)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r      s   r   c               C   s
   t ƒ  d S )N)r   r   r   r   r   ÚtearDownModule#   s    r   Ú__main__)Ú__doc__r   r   r   ÚunittestZtest.fork_waitr   Ztest.supportr   r   r   r   r   Úmainr   r   r   r   Ú<module>   s   

