
    "d                    ^    d dl mZ d dlZd dlmZ  ej
                  e      Z G d de      Zy)    )annotationsN)
BaseThreadc                  $     e Zd Z fdZd Z xZS )ProcessWatcherc                >    t         |           || _        || _        y )N)super__init__	popen_objprocess_termination_callback)selfr
   r   	__class__s      @/usr/lib/python3/dist-packages/watchdog/utils/process_watcher.pyr	   zProcessWatcher.__init__   s    ",H)    c                    	 | j                   j                         n| j                  j                  d      ry 9	 | j	                          y # t
        $ r t        j                  d       Y y w xY w)Ng?)timeoutz*Error calling process termination callback)r
   pollstopped_eventwaitr   	Exceptionlogger	exception)r   s    r   runzProcessWatcher.run   sl    ~~""$0!!&&s&3	 	K--/ 	KIJ	Ks   A A.-A.)__name__
__module____qualname__r	   r   __classcell__)r   s   @r   r   r   
   s    I

Kr   r   )	
__future__r   loggingwatchdog.utilsr   	getLoggerr   r   r    r   r   <module>r"      s.    "  %			8	$KZ Kr   