Making a Unix daemon process (was: Forking into the background (Linux))
Ben Finney
ben+python at benfinney.id.au
Mon Dec 24 02:17:56 EST 2012
Hans Mulder <hansmu at xs4all.nl> writes:
> On 24/12/12 01:50:24, Olive wrote:
> > My goal is to write a script that 1) write something to stdout; then
> > fork into the background, closing the stdout (and stderr, stdin) pipe.
> >
> > I have found this answer (forking -> setsid -> forking)
> > http://stackoverflow.com/a/3356154
You're following a path that leads to the desire for a “daemon”
<URL:http://stackoverflow.com/questions/473620/how-do-you-create-a-daemon-in-python/688448#688448>.
> You may want to look at the python-daemon module on Pypy, which
> appears to do what you need, including some features you haven't asked
> for, yet.
It's even better when you look at it on PyPI
<URL:http://pypi.python.org/pypi/python-daemon/> (note that PyPy is a
Python implementation, PyPI is an index of Python packages).
The discussion forum for ‘python-daemon’ development is at
<URL:http://lists.alioth.debian.org/mailman/listinfo/python-daemon-devel>.
--
\ “Faith may be defined briefly as an illogical belief in the |
`\ occurrence of the improbable.” —Henry L. Mencken |
_o__) |
Ben Finney
More information about the Python-list
mailing list