[Python-Dev] Inherance of file descriptor and handles on Windows (PEP 446) (original) (raw)

Cameron Simpson cs at zip.com.au
Thu Jul 25 01:54:24 CEST 2013


On 25Jul2013 00:35, Antoine Pitrou <solipsis at pitrou.net> wrote: | On Wed, 24 Jul 2013 15:25:50 -0700 | Guido van Rossum <guido at python.org> wrote: | > >> 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. | > > | > > What do you call "daemon"? An actual Unix-like daemon? | > | > Yeah, a background process with parent PID 1 and not associated with | > any terminal group. || But is that relevant to the PEP? A daemon only uses fork(), not exec().

Not necessarily.

I routinely run other commands in a daemonlike mode, without the command itself having "make myself a daemon" functionality. If I were writing the launcher in Python (and my "setsid" script is Python already), I would be doing all the daemon bits in Python including the fork, then execing the other tool.

Cheers,

If it can't be turned off, it's not a feature. - Karl Heuer



More information about the Python-Dev mailing list