Oleg Broytmann <phd@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