[issue9788] atexit and execution order
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 - 188.8.131.52 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."
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list