[issue4200] atexit module not safe in Python 3.0 with multiple interpreters

Christian Heimes report at bugs.python.org
Sun Oct 26 19:56:53 CET 2008


Christian Heimes <lists at cheimes.de> added the comment:

I'm trying to come up with a patch. It's a little bit trickier than I
thought. The atexit module registers "atexit_callfuncs()" with
_Py_PyAtExit(). The "atexit_callfuncs()" function is called by
Python/pythonrun.c when the interpreter exits. The function is cleared
as "static void atexit_callfuncs(void)" so it doesn't get the module
through self. However PyModule_GetDef requires self.

In order to use PEP 3121 we have to add a mechanism to pass the module
instance to atexit_callfuncs().

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


More information about the Python-bugs-list mailing list