[issue46025] Raising in an atexit function in dev mode crashes

STINNER Victor report at bugs.python.org
Thu Dec 9 12:03:09 EST 2021


STINNER Victor <vstinner at python.org> added the comment:

For me, the question is why would anyone call atexit.unregister() inside an atexit callback. Is it useful?

atexit._run_exitfuncs() removes all registered callbacks.

Py_Finalize() calls _PyAtExit_Call() which also removes all registered callbacks.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46025>
_______________________________________


More information about the Python-bugs-list mailing list