Commit 1134b0db authored by Victor Stinner's avatar Victor Stinner

Fix _PyFaulthandler_Fini() so it can be called before _PyFaulthandler_Init()

parent 76961faa
...@@ -1282,8 +1282,8 @@ void _PyFaulthandler_Fini(void) ...@@ -1282,8 +1282,8 @@ void _PyFaulthandler_Fini(void)
#ifdef FAULTHANDLER_LATER #ifdef FAULTHANDLER_LATER
/* later */ /* later */
cancel_dump_tracebacks_later();
if (thread.cancel_event) { if (thread.cancel_event) {
cancel_dump_tracebacks_later();
PyThread_release_lock(thread.cancel_event); PyThread_release_lock(thread.cancel_event);
PyThread_free_lock(thread.cancel_event); PyThread_free_lock(thread.cancel_event);
thread.cancel_event = NULL; thread.cancel_event = NULL;
...@@ -1296,8 +1296,8 @@ void _PyFaulthandler_Fini(void) ...@@ -1296,8 +1296,8 @@ void _PyFaulthandler_Fini(void)
#ifdef FAULTHANDLER_WATCHDOG #ifdef FAULTHANDLER_WATCHDOG
/* file watchdog */ /* file watchdog */
cancel_file_watchdog();
if (watchdog.cancel_event) { if (watchdog.cancel_event) {
cancel_file_watchdog();
PyThread_release_lock(watchdog.cancel_event); PyThread_release_lock(watchdog.cancel_event);
PyThread_free_lock(watchdog.cancel_event); PyThread_free_lock(watchdog.cancel_event);
watchdog.cancel_event = NULL; watchdog.cancel_event = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment