From: Mark Hammond Date: Wed, 9 Jul 2003 04:57:46 +0000 (+0000) Subject: Fix [ 766669 ] Consistent GPF on exit X-Git-Tag: v2.3c1~145 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=14350ab006fcf230b59ca253a13eacb2ef4c9cbf;p=python Fix [ 766669 ] Consistent GPF on exit Use Py_AtExit instead of atexit so we are called during Py_Finalize() rather than during DLL teardown. --- diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index ecb6f1a038..c21d599779 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -3358,7 +3358,7 @@ os_init(void) ret = WSAStartup(0x0101, &WSAData); switch (ret) { case 0: /* No error */ - atexit(os_cleanup); + Py_AtExit(os_cleanup); return 1; /* Success */ case WSASYSNOTREADY: PyErr_SetString(PyExc_ImportError,