[Python-ideas] Draft PEP (version 0.4): Standard daemon?process?library
ben+python at benfinney.id.au
Thu Apr 9 00:22:37 CEST 2009
Aahz <aahz at pythoncraft.com> writes:
> [responding very late]
> On Thu, Jan 29, 2009, Antoine Pitrou wrote:
> > Delete the stale lock file silently and continue as though it
> > didn't exist. (and, of course, create another one for the current
> > process)
> This should be determined by the API -- for example, a process
> running against an NFS disk that may be run from any of several
> servers but should only run on one server at any time ought to abort
> if there's a stale PID file.
This and several other issues make PID file handling quite a thorny
subject, and I'm working with Skip Montanaro on an implementation
separated from the daemon PEP 3143.
The current PEP 3143 delegates all these decisions (by not mentioning
them at all) to the context manager ‘__entry__’ and ‘__exit__’ of an
optional ‘pidfile’ parameter.
\ “There's no excuse to be bored. Sad, yes. Angry, yes. |
`\ Depressed, yes. Crazy, yes. But there's no excuse for boredom, |
_o__) ever.” —Viggo Mortensen |
More information about the Python-ideas