summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/pylifecycle.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index 54a35a2..7b80d01 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -2632,19 +2632,16 @@ Py_ExitStatusException(PyStatus status)
}
}
+
/* Clean up and exit */
static void
call_py_exitfuncs(PyThreadState *tstate)
{
- PyInterpreterState *interp = tstate->interp;
- if (interp->atexit_func == NULL)
- return;
-
- interp->atexit_func(interp->atexit_module);
- _PyErr_Clear(tstate);
+ _PyAtExit_Call(tstate->interp->atexit_module);
}
+
/* Wait until threading._shutdown completes, provided
the threading module was imported in the first place.
The shutdown routine will wait until all non-daemon