[issue16822] execv (et al.) should invoke atexit handlers before executing new code

Antoine Pitrou report at bugs.python.org
Mon Dec 31 12:44:15 CET 2012


Antoine Pitrou added the comment:

That's a good question. Conceptually it makes sense, but I wonder if programs currently rely on os.execv not cleaning up anything: not only it doesn't call atexit handlers, but it also doesn't try to shutdown the interpreter. Which can be handy if you are using exec() in a fork() + exec() context (I think it is generally recommended to use os._exit(), not sys.exit() in a forked child).

----------
nosy: +neologix, pitrou
type:  -> enhancement
versions: +Python 3.4 -Python 2.7, Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16822>
_______________________________________


More information about the Python-bugs-list mailing list