summaryrefslogtreecommitdiffstats
path: root/Python/pylifecycle.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/pylifecycle.c')
-rw-r--r--Python/pylifecycle.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index c4a6d7c..35ca88f 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -1354,17 +1354,17 @@ Py_FatalError(const char *msg)
if (!_Py_FatalError_PrintExc(fd))
_Py_FatalError_DumpTracebacks(fd);
+ /* The main purpose of faulthandler is to display the traceback. We already
+ * did our best to display it. So faulthandler can now be disabled.
+ * (Don't trigger it on abort().) */
+ _PyFaulthandler_Fini();
+
/* Check if the current Python thread hold the GIL */
if (PyThreadState_GET() != NULL) {
/* Flush sys.stdout and sys.stderr */
flush_std_files();
}
- /* The main purpose of faulthandler is to display the traceback. We already
- * did our best to display it. So faulthandler can now be disabled.
- * (Don't trigger it on abort().) */
- _PyFaulthandler_Fini();
-
#ifdef MS_WINDOWS
len = strlen(msg);