[Twisted-Python] python-daemon PID file

null null nullnull26 at gmail.com
Fri Mar 19 13:16:26 MDT 2010


Hi all,

Im trying to get a daemon up and running but i cant get python-daemon to
create a PID file.
versions:
Python 2.5.2
python-daemon-1.5.5
Debian Linux 2.6.26-2-686

<code>
import daemon
import lockfile

daemon.DaemonContext(pidfile=lockfile.FileLock('/var/run/mydaemon.pid'),)

daemon.__enter__()
main()
daemon.__exit__()

</code>

The above doesnt create a pid file, ive tried different permissions for the
daemon and manualy making the pid file in the main() but no luck.

In summary: I cant get a PID file created or populated with a PID by
python-daemon.
Anyone see something that im doing wrong? ive been sitting on this way too
long. I looked at the python-daemon source and i cant see where the pid is
inserted into the pid file, only where it __enter__'s the lockfile so is
this functionality missing?

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20100319/c6cb5e68/attachment.html>


More information about the Twisted-Python mailing list