[Python-Dev] Daemon creation code in the standard library (original) (raw)
Antoine Pitrou solipsis at pitrou.net
Fri Jul 26 19:07:35 CEST 2013
- Previous message: [Python-Dev] Daemon creation code in the standard library
- Next message: [Python-Dev] Daemon creation code in the standard library (was: Inherance of file descriptor and handles on Windows (PEP 446))
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Fri, 26 Jul 2013 09:38:10 +0200 Ronald Oussoren <ronaldoussoren at mac.com> wrote:
On 25 Jul, 2013, at 4:18, Ben Finney <ben+python at benfinney.id.au> wrote: > Ben Finney <ben+python at benfinney.id.au> writes: > >> Work continues on the PEP 3143-compatible ‘python-daemon’, porting it to >> Python 3 and aiming for inclusion in the standard library. At first glance the library appears to close all open files, with an option to exclude some specific file descriptors (that is, you need to pass a list of files that shouldn't be closed).
Indeed, it's annoying when you want to setup logging before daemonization starts. I had to hack my way through logging handlers to find the fd I had to keep open.
That makes it a lot harder to do some initialization before daemonizing. I prefer to perform at least some initialization early in program startup to be able to give sensible error messages. I've had too many initscripts that claimed to have started a daemon sucessfully, only to have that daemon stop right away because it noticed a problem right after it detached itself.
Agreed.
Regards
Antoine.
- Previous message: [Python-Dev] Daemon creation code in the standard library
- Next message: [Python-Dev] Daemon creation code in the standard library (was: Inherance of file descriptor and handles on Windows (PEP 446))
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]