From: Guido van Rossum Date: Mon, 19 Jan 1998 22:00:38 +0000 (+0000) Subject: It seems obvious that when Py_Finalize() decides that there's nothing X-Git-Tag: v1.5.1~941 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4cc462e85b1c2c393460e780c314e73691e15852;p=thirdparty%2FPython%2Fcpython.git It seems obvious that when Py_Finalize() decides that there's nothing to do, it should not call sys.exitfunc either... --- diff --git a/Python/pythonrun.c b/Python/pythonrun.c index e57428191885..100786064263 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;