[Python-Dev] MinGW And The other Py2.4 issue

"Martin v. Löwis" martin at v.loewis.de
Mon Dec 13 23:31:57 CET 2004

Thomas Heller wrote:
> And recently I played with bindings to OpenGL's glut32.dll - glut calls
> exit() from internal C code.  If linked with the wrong CRT, this will do
> nothing instead of terminating the process.

Interesting. Looking at the code of exit(), it is clear that the wrong
atexit handlers will be called if you use the wrong CRT (i.e. only one
set of atexit handlers will be called, whereas you might have multiple
lists of atexit handlers); see atonexit.c.

It is not so clear why you could possibly get out of exit() without
actually exiting. The only possible code path I see in the msvcr71.dll
is when mscoree.dll is in the address space, in which case the CRT
will invoke CorExitProcess (!). In all other cases, it will invoke
ExitProcess, which, to my understanding, will terminate the process


More information about the Python-Dev mailing list