Yesterday I started working on some updates to zdaemon.  zdaemon is pretty
cool.  It is a Unix-only tool that:

- Turns an arbitrary program into a fairly well-behaved daemon

- Provides management of an applications output as a log file.

- Provides start, stop and restart commands for starting or stopping

- Provides a status command for finding out if an app is running.

- Provides a kill command for sending an app a signal (e.g. for
  log rotation).

- Automatically restarts applications that exit abnormally, with a
  fairly reasonable approach for limiting restart attempts in case
  something is failing on startup.

- Provides a number of useful configuration settings that can
  be managed using a clean (ZConfig-based) log file.

It is written in Python, but it can control any program.  We're using
it to control spread, which is a C program.  spread comes with it's
own Red Hat startup script, but spread fails to detach from the
controlling terminal.  zdaemon makes it behave properly and provides
a startup script that will work on any Unix-like system.

It has 2 major disadvantages:

- It is ours. :)  We are bearing the burden of maintaining it.
  This is offset by the fact that it hasn't required much maintenance.

- It is largely undocumented. This makes it much harder to use than it
  needs to be.  It also makes it under appreciated.  I made a start at
  fixing this yesterday:

 It isn't very hard to use, so documenting it isn't really all that hard.

I wonder if we should be using some other daemon manager.  Arguably, there's
no reason for the Zope project to maintain one if something is available
that does what we need.  Does anyone know of something that does what zdaemon
does?  daemontools seems somewhat close:

Going from the documentation, it doesn't seem to be as clever about
application restart.  The documentation says nothing about distinguishing
between normal and abnormal restarts or avoiding useless restarts when there
are start-up errors.

If we do continue to maintain zdaemon, we really should publicize it more
widely, both to get credit and to get more people interested in maintaining

Because I want the enhancements I'm making for another project I'm working
on, I'm going to proceed with them for now.



Jim Fulton           mailto:[EMAIL PROTECTED]       Python Powered!
CTO                  (540) 361-1714  
Zope Corporation

Zope3-dev mailing list

Reply via email to