Writing a simple linux daemon type thing...
gashton at cmedltd.com
Mon Jun 17 06:09:08 EDT 2002
On Fri, 2002-06-14 at 14:05, Michael Hudson wrote:
> If you run it as a true daemon, you need to be careful about writing
> to stdout/stderr (because they're not there any more). Think
There's an example of how to do this (which I think I took from Python
Standard Library) in the Daemon class in gmalib. It use's gmalib's
Logger class to send all output to either a normal file, or syslog.
You can download gmalib here:
or save yourself the trouble by browsing the CVS archive first:
It's GPL'd, so feel free to re-use, etc.
gmalib.Daemon.__init__(self, logfile="log.txt", use_syslog=0)
More information about the Python-list