[Python-ideas] Draft PEP: Standard daemon process library
Oleg Broytmann
phd at phd.pp.ru
Thu Jan 29 22:22:15 CET 2009
On Fri, Jan 30, 2009 at 08:14:07AM +1100, Ben Finney wrote:
> 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?
I think an implementation would be enough.
> > 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()`.
Thank you!
Oleg.
--
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