o
    *ήc                     @   s2   d dl Z d dlmZ e eZG dd deZdS )    N)
BaseThreadc                       s$   e Zd Z fddZdd Z  ZS )ProcessWatcherc                    s   t    || _|| _d S )N)super__init__	popen_objprocess_termination_callback)selfr   r   	__class__ E/tmp/pip-target-vg8gfxp4/lib/python/watchdog/utils/process_watcher.pyr   
   s   

zProcessWatcher.__init__c                 C   sT   	 | j  d ur	n
| jjddrd S qz|   W d S  ty)   td Y d S w )NTg?)timeoutz*Error calling process termination callback)r   pollstopped_eventwaitr   	Exceptionlogger	exception)r   r   r   r   run   s   zProcessWatcher.run)__name__
__module____qualname__r   r   __classcell__r   r   r	   r   r   	   s    r   )loggingwatchdog.utilsr   	getLoggerr   r   r   r   r   r   r   <module>   s    
