[Twisted-Python] daemonization

Clark C. Evans cce at clarkevans.com
Sun Feb 23 18:21:28 EST 2003

Hello.  I've got my application working nicely (well, the linkage
to postgresql still needs work) and it looks sort of like:

if __name__ == '__main__':
    root = Resource()
    site = server.Site(root)
    appl = Application("whatever")

What I'd like to do now is have this act like a deamon where
I run a command like:

  server start     # starts server, and then returns
  server stop      # stops server
  server reload    # reloads server

also including functionality of logging to a given file
and rotating the logs as necessary.  Anyway, I'm sure there 
is shell script magic to do this or I could copy the deamon 
example in the ASPN Cookbook...

But, I was wondering if there was a simple thing I could inherit
from which would do such a thing automagically.


P.S. Yes, I suppose this is what that "taps" thing is all
about... however, it doesn't seem to do the deamon 
management well (it doesn't do stop/start/reload, right?)

More information about the Twisted-Python mailing list