+
    üÐjñ	  ã                   óh   € R t ^ RIHtHt ^ RIHt ^ RIHt  ! R R]P                  4      tR R lt	R# )	z>
Support for creating a service which runs a process monitor.
)ÚListÚSequence)Úusage)ÚProcessMonitorc                   ó”   a € ] tR t^t o RtRtRR^R].RR^R].R	R
^R].RRRR]..t. tRt	V 3R lR lt
V 3R lR ltV 3R ltRtV tR# )ÚOptionsz>
Define the options accepted by the I{twistd procmon} plugin.
z[procmon options] commandlineÚ	thresholdÚtzRHow long a process has to live before the death is considered instant, in seconds.ÚkilltimeÚkzpHow long a process being killed has to get its affairs in order before it gets killed with an unmaskable signal.ÚminrestartdelayÚmzLThe minimum time (in seconds) to wait before attempting to restart a processÚmaxrestartdelayÚMi  zLThe maximum time (in seconds) to wait before attempting to restart a processa`  procmon runs processes, monitors their progress, and restarts them when they
die.

procmon will not attempt to restart a process that appears to die instantly;
with each "instant" death (less than 1 second, by default), it will delay
approximately twice as long before restarting it. A successful run will reset
the counter.

Eg twistd procmon sleep 10c                ó$   <€ V ^8„  d   QhRS[ RR/# )é   ÚargsÚreturnN)Ústr)ÚformatÚ__classdict__s   "€Ú;/usr/lib/python3/dist-packages/twisted/runner/procmontap.pyÚ__annotate__ÚOptions.__annotate__I   s   ø€ ÷ ñ ™sð  tñ ó    c                ó   € WR&   R# )zA
Grab the command line that is going to be started and monitored
r   N© )Úselfr   s   &*r   Ú	parseArgsÚOptions.parseArgsI   s   € ð ˆV‹r   c                ó   <€ V ^8„  d   QhRR/# )r   r   Nr   )r   r   s   "€r   r   r   O   s   ø€ ÷ Kñ K˜Tñ Kr   c                ó`   € \        V R,          4      ^8  d   \        P                  ! R4      hR# )z
Check for dependencies.
r   z$Please specify a process commandlineN)Úlenr   Ú
UsageError)r   s   &r   ÚpostOptionsÚOptions.postOptionsO   s,   € ô ˆt�F�|Ó˜qÔ Ü×"Ò"Ð#IÓJÐJñ !r   c                óF   <€ V ^8„  d   Qh/ S[ S[S[,          ,          ;R&   # )r   ÚoptFlags)r   r   r   )r   r   s   "€r   r   r      s   ø‡ ‚ ñZ ‘8™C•=Õ!Ñ&ò[ r   r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__ÚsynopsisÚfloatÚoptParametersr'   Úlongdescr   r$   Ú__annotate_func__Ú__static_attributes__Ú__classdictcell__)r   s   @r   r   r      s¬   ø‡ € ñð /€Hð ØØðBàð	
ð ØØð)ð ð	
ð ØØðð ð	
ð ØØðð ð	
ð7$€MðL %'€Hð	€H÷ð ÷Kð K÷A ƒ r   r   c                ó0   € V ^8„  d   QhR\         R\        /# )r   Úconfigr   )r   r   )r   s   "r   r   r   W   s   € ÷ 	ñ 	œð 	¤Nñ 	r   c                 óè   € \        4       pV R ,          Vn        V R,          Vn        V R,          Vn        V R,          Vn        VP                  RP                  V R,          4      V R,          4       V# )r   r
   r   r   Ú r   )r   r   ÚkillTimeÚminRestartDelayÚmaxRestartDelayÚ
addProcessÚjoin)r5   Úss   & r   ÚmakeServicer>   W   sb   € ÜÓ€Aà˜Õ%€A„KØ˜
Õ#€A„JØÐ0Õ1€AÔØÐ0Õ1€AÔà‡L�L�—‘˜& �.Ó)¨6°&­>Ô:Ø€Hr   N)
r,   Útypingr   r   Útwisted.pythonr   Útwisted.runner.procmonr   r   r>   r   r   r   Ú<module>rB      s/   ðñ
÷ "å  Ý 1ôEKˆe�m‰mô EK÷P	r   