Am Freitag, 22. Dezember 2006 23:04 schrieb Jim Fulton:
> An abnormal exit is an exit due to some error, such as a segmentation
> fault or running out of memory.
>  > in the sense, how would the
> >
> > supervisor know thats it's abnormal?
> It can check the exit status.  Normal shutdowns typycally exit with
> status 0.  zdaemon (and supervisor2, which was obviously inspired by
> zdaemon) has an exit-codes option to configure which exit codes
> are normal.  If the supervisor exists with one of these exit codes,
> it should not be restarted.

i see. however, i guess the idea of a supervisor is just for such cases: to 
take care to restart a server that broke. there's "svc -o" to run a service 
only "once", which comes handy if one is not sure if the server will survive 
a start. what i think to make more sense would be that the supervisor could 
detect if a server is restarted too frequently. in my experience, thats more 
often a situation that needs special attention.

> > FWIW, there's also "runit", obviously developed in the same spirit but
> > independend of daemontools:
> This wants to run as process 1.  This seems a bit intrusive.

yes and no. the page i linked to explains how to use it while _not_ replacing 
init. in that mode it seems to be quite like daemontools (see "The sv 
program", "The runsvdir program", "The runsvchdir program" and "The runsv 
program" on the main runit page). i guess there is at least some support for 
your use case, see one can 
define a "finish" script, which is started with the exit code of the 
supervised process as one of its parameters.

Cheers, Sascha

Lalisio GmbH                      

Puschkinstraße 1                   fon +49-(0)361/541 43 80
99084 Erfurt                       fax +49-(0)361/541 43 79
                                       [EMAIL PROTECTED]
Zope3-dev mailing list

Reply via email to