[Python-ideas] Draft PEP: Standard daemon process library

Ben Finney ben+python at benfinney.id.au
Thu Jan 29 22:14:07 CET 2009

Oleg Broytmann <phd at phd.pp.ru> writes:

>    IWBN to have a main() function in the module to be used from the
> command line:
> $ python -m daemon --pidfile=/var/run/mydaemon.pid status
> Daemon pid 1221 is running
> $ python -m daemon --pidfile=/var/run/mydaemon.pid stop
> $ python -m daemon --pidfile=/var/run/mydaemon.pid status
> Cannot find /var/run/mydaemon.pid

Interesting. Should that be defined in this PEP, or merely added to
the reference implementation as a bonus?

>    A note on implementation detail: IWBN if the pidfile is removed on
> stop(). Please do not put the burden unto the user.

Yes, that's already addressed in the defined behaviour for `stop()`.

 \       “Know what I hate most? Rhetorical questions.” —Henry N. Camp |
  `\                                                                   |
_o__)                                                                  |
Ben Finney

More information about the Python-ideas mailing list