summaryrefslogtreecommitdiffstats
path: root/Modules/faulthandler.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2012-01-10 21:44:11 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2012-01-10 21:44:11 (GMT)
commit1134b0dbbd3fa2afe5ea3989ea3b0d4f4682a4ef (patch)
treed576e204cc1920f77a33823a8baba3877732c121 /Modules/faulthandler.c
parent76961faaa0323580caac8068848c33b7aeec13ee (diff)
downloadcpython-1134b0dbbd3fa2afe5ea3989ea3b0d4f4682a4ef.zip
cpython-1134b0dbbd3fa2afe5ea3989ea3b0d4f4682a4ef.tar.gz
cpython-1134b0dbbd3fa2afe5ea3989ea3b0d4f4682a4ef.tar.bz2
Fix _PyFaulthandler_Fini() so it can be called before _PyFaulthandler_Init()
Diffstat (limited to 'Modules/faulthandler.c')
-rw-r--r--Modules/faulthandler.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/faulthandler.c b/Modules/faulthandler.c
index 51c66bd..fcf4d01 100644
--- a/Modules/faulthandler.c
+++ b/Modules/faulthandler.c
@@ -1282,8 +1282,8 @@ void _PyFaulthandler_Fini(void)
#ifdef FAULTHANDLER_LATER
/* later */
- cancel_dump_tracebacks_later();
if (thread.cancel_event) {
+ cancel_dump_tracebacks_later();
PyThread_release_lock(thread.cancel_event);
PyThread_free_lock(thread.cancel_event);
thread.cancel_event = NULL;
@@ -1296,8 +1296,8 @@ void _PyFaulthandler_Fini(void)
#ifdef FAULTHANDLER_WATCHDOG
/* file watchdog */
- cancel_file_watchdog();
if (watchdog.cancel_event) {
+ cancel_file_watchdog();
PyThread_release_lock(watchdog.cancel_event);
PyThread_free_lock(watchdog.cancel_event);
watchdog.cancel_event = NULL;