[issue9788] atexit and execution order

Meador Inge report at bugs.python.org
Sun Sep 12 20:49:38 CEST 2010


Meador Inge <meadori at gmail.com> added the comment:

I agree with Antoine's LIFO comment.  Also, FWIW, the C standard library behaves in a LIFO manner as well (C99 spec - 7.20.4.3 clause 3):

"First, all functions registered by the atexit function are called, in the reverse order of their registration,253) except that a function is called after any previously registered functions that had already been called at the time it was registered. If, during the call to any such function, a call to the longjmp function is made that would terminate the call to the registered function, the behavior is undefined."

----------
nosy: +meador.inge

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


More information about the Python-bugs-list mailing list