]> granicus.if.org Git - python/commitdiff
Fix [ 766669 ] Consistent GPF on exit
authorMark Hammond <mhammond@skippinet.com.au>
Wed, 9 Jul 2003 04:57:46 +0000 (04:57 +0000)
committerMark Hammond <mhammond@skippinet.com.au>
Wed, 9 Jul 2003 04:57:46 +0000 (04:57 +0000)
Use Py_AtExit instead of atexit so we are called during Py_Finalize()
rather than during DLL teardown.

Modules/socketmodule.c

index ecb6f1a038be80c6538847b7e9cf827872410bec..c21d5997796b042c4b53d81b577c3d501962b414 100644 (file)
@@ -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,