Le Thu, 25 Jul 2013 12:08:18 +1000, Ben Finney <ben+pyt...@benfinney.id.au> a écrit : > Guido van Rossum <gu...@python.org> writes: > > > To reduce the need for 3rd party subprocess creation code, we should > > have better daemon creation code in the stdlib -- I wrote some damn > > robust code for this purpose in my previous job, but it never saw > > the light of day. > > Work continues on the PEP 3143-compatible ‘python-daemon’, porting it > to Python 3 and aiming for inclusion in the standard library.
The PEP hasn't been formally accepted yet, however. Skimming back through the archives, one sticking point was the default value of the "umask" parameter. Setting the umask to 0 if the user didn't ask for something else is a disaster, security-wise. Another problem I've had when using it is that the `pidfile` combines the notion of pidfile and process lock in one unique attribute. This is quite inflexible when you're using something else than Skip Montanaro's "lockfile" library. I'm using a separate lock based on locket.py: https://github.com/mwilliamson/locket.py because it is based on POSIX advisory locks, and therefore doesn't suffer from the "stale pid file" issues you get when a process (or the whole system) crashes. Therefore I'd be -1 on the PEP until those issues are alleviated. Regards Antoine. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com