[issue16822] execv (et al.) should invoke atexit handlers before executing new code
Charles-François Natali
report at bugs.python.org
Mon Dec 31 13:01:03 CET 2012
Charles-François Natali added the comment:
The first reason for not calling atexit handlers upon exec() is that
it wouldn't be async-safe anymore, and could result in deadlocks.
Also, since atexit handlers are inherited upon fork(), running atexit
handlers upon exec() could result in such handlers being called
several times - something which should definitely be avoided.
Note that the atexit documentation states that handlers will only be
called in case of "normal interpreter termination".
So I'm -1 on the change, the chance of breaking existing applications
is way too high.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16822>
_______________________________________
More information about the Python-bugs-list
mailing list