On Sun, 13 Jan 2013 21:33:30 +1000 Nick Coghlan <ncogh...@gmail.com> wrote: > On Sun, Jan 13, 2013 at 9:15 PM, Antoine Pitrou <solip...@pitrou.net> wrote: > >> It also means we're free to implement a mechanism that tries to close > >> all sensitive file descriptors in _PyOS_AfterFork. > > > > Ouch! This actually shows that "noinherit" is a very bad name. The PEP > > is about closing fds after exec(), *not* after fork(). So "cloexec" is > > really the right, precise, non-ambiguous name here. > > No, 'cloexec' is a terrible name, because, aside from the cryptic > opacity of it, it's also wrong on Windows, which doesn't have the > fork() vs exec() distinction.
Just because Windows doesn't have the fork() vs exec() distinction doesn't mean "cloexec" is a bad description of the flag: it describes exactly what happens (the fd gets closed when executing an external program). As for the opacity, feel free to propose something better ("close_on_spawn", whatever). But I'm definitely and strongly -1 on "noinherit". 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