summaryrefslogtreecommitdiffstats
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-01-19 22:00:38 (GMT)
committerGuido van Rossum <guido@python.org>1998-01-19 22:00:38 (GMT)
commit4cc462e85b1c2c393460e780c314e73691e15852 (patch)
tree6fe8f698ca6c472ca4fc76c3df42446283e23d03 /Python/pythonrun.c
parentd2dd9a8b7f3446b904600ec5de6945a2d9f5598c (diff)
downloadcpython-4cc462e85b1c2c393460e780c314e73691e15852.zip
cpython-4cc462e85b1c2c393460e780c314e73691e15852.tar.gz
cpython-4cc462e85b1c2c393460e780c314e73691e15852.tar.bz2
It seems obvious that when Py_Finalize() decides that there's nothing
to do, it should not call sys.exitfunc either...
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r--Python/pythonrun.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index e574281..1007860 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -179,12 +179,12 @@ Py_Finalize()
PyInterpreterState *interp;
PyThreadState *tstate;
- call_sys_exitfunc();
-
if (!initialized)
return;
initialized = 0;
+ call_sys_exitfunc();
+
/* Get current thread state and interpreter pointer */
tstate = PyThreadState_Get();
interp = tstate->interp;