How do you create a daemon in Python?
Posted
by DavidM
on Stack Overflow
See other posts from Stack Overflow
or by DavidM
Published on 2009-01-23T16:48:06Z
Indexed on
2010/04/15
23:33 UTC
Read the original article
Hit count: 160
Searching on Google reveals x2 code snippets. The first result is to this code recipe which has a lot of documentation and explanation, along with some useful discussion underneath.
However, another code sample, whilst not containing so much documentation, includes sample code for passing commands such as start, stop and restart. It also creates a PID file which can be handy for checking if the daemon is already running etc.
These samples both explain how to create the daemon. Are there any additional things that need to be considered? Is one sample better than the other, and why?
© Stack Overflow or respective owner