[Zope-dev] Re: Is there an alternative to zdaemon?

Tres Seaver tseaver at palladion.com
Fri Dec 22 17:55:16 EST 2006

Hash: SHA1

Jim Fulton wrote:
> 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
>    applications.
> - 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:
>      http://svn.zope.org/zdaemon/trunk/src/zdaemon/README.txt?view=auto
>   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:
>    http://cr.yp.to/daemontools.html

AFAIK, daemontools is a Dan Bernstein creation, which makes for rocky
territory, IP wise.  He offers his code under a "my way or the highway"
license, which *forbids* distributing modified versions (this was last I
checked -- I couldn't find a license mentioned anywhere on his site).

> 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
> it.
> Because I want the enhancements I'm making for another project I'm working
> on, I'm going to proceed with them for now.

Chris McDonough's 'supervisor' is a Python-based implementation of the
same basic idea, with even more generality:  the 'supervisord' process,
for instance, can be controlled from a remote host.


- --
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


More information about the Zope-Dev mailing list