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

Oleg Broytmann phd at phd.pp.ru
Thu Jan 29 13:01:49 CET 2009

On Thu, Jan 29, 2009 at 01:42:44PM +1100, Ben Finney wrote:
> rather specific Unix-native concept: the "pidfile", a combination
> sentinel, lockfile, and primitive text interface.

   IWBN to have a main() function in the module to be used from the command

$ 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

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

> I might return the terminology in the PEP back to "pidfile" to be
> clear.


     Oleg Broytmann            http://phd.pp.ru/            phd at phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.

More information about the Python-ideas mailing list