summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-07-14 18:02:13 (GMT)
committerGuido van Rossum <guido@python.org>1998-07-14 18:02:13 (GMT)
commit43ff8683fe68424b9c179ee4970bb865e11036d6 (patch)
tree59592acc31ae261b6953ed08a063e25eee7fc117 /Modules
parent69a79bca6860ae84f502f163176bf49b633d6add (diff)
downloadcpython-43ff8683fe68424b9c179ee4970bb865e11036d6.zip
cpython-43ff8683fe68424b9c179ee4970bb865e11036d6.tar.gz
cpython-43ff8683fe68424b9c179ee4970bb865e11036d6.tar.bz2
Temporarily get rid of the registration of Tcl_Finalize() as a
low-level Python exit handler. This can attempt to call Python code at a point that the interpreter and thread state have already been destroyed, causing a Bus Error. Given the intended use of Py_AtExit(), I'm not convinced that it's a good idea to call it earlier during Python's finalization sequence... (Although this is the only use for it in the entire distribution.)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_tkinter.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
index fc52657..e1b2b18 100644
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -2030,9 +2030,14 @@ init_tkinter()
if (PyErr_Occurred())
return;
+#if 0
+ /* This was not a good idea; through <Destroy> bindings,
+ Tcl_Finalize() may invoke Python code but at that point the
+ interpreter and thread state have already been destroyed! */
#if TKMAJORMINOR >= 8000
Py_AtExit(Tcl_Finalize);
#endif
+#endif
#ifdef macintosh
/*