mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
Fix [ 766669 ] Consistent GPF on exit
Use Py_AtExit instead of atexit so we are called during Py_Finalize() rather than during DLL teardown.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user