summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorferrieux <ferrieux@users.sourceforge.net>2009-07-22 08:41:59 (GMT)
committerferrieux <ferrieux@users.sourceforge.net>2009-07-22 08:41:59 (GMT)
commit598551ed4987a7a3cd237cd8b66cf5becb3e8b1f (patch)
tree5fbbfdf11fe30a783e49463ffe7269a92448d86b
parent84dd98f930dfe07339e9c8ea45423ba3fe0a2d92 (diff)
downloadtcl-598551ed4987a7a3cd237cd8b66cf5becb3e8b1f.zip
tcl-598551ed4987a7a3cd237cd8b66cf5becb3e8b1f.tar.gz
tcl-598551ed4987a7a3cd237cd8b66cf5becb3e8b1f.tar.bz2
Refined the 20090617 patch on [exit] streamlining, so that it now correctly calls thread exit handlers for the calling thread, which includes <Destroy> bindings in Tk [Bug 2001201 again].
-rw-r--r--ChangeLog7
-rw-r--r--generic/tclEvent.c19
2 files changed, 21 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 2eb01c7..f95c3ce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-07-22 Alexandre Ferrieux <ferrieux@users.sourceforge.net>
+
+ * generic/tclEvent.c: Refined the 20090617 patch on [exit]
+ streamlining, so that it now correctly calls thread exit handlers
+ for the calling thread, which includes <Destroy> bindings in Tk
+ [Bug 2001201 again].
+
2009-07-21 Kevin B. Kenny <kennykb@acm.org>
* library/tzdata/Asia/Dhaka:
diff --git a/generic/tclEvent.c b/generic/tclEvent.c
index 6c55ef0..4f67608 100644
--- a/generic/tclEvent.c
+++ b/generic/tclEvent.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclEvent.c,v 1.90 2009/06/18 09:41:26 dkf Exp $
+ * RCS: @(#) $Id: tclEvent.c,v 1.91 2009/07/22 08:41:59 ferrieux Exp $
*/
#include "tclInt.h"
@@ -952,11 +952,20 @@ Tcl_Exit(
InvokeExitHandlers();
/*
- * This triggers a flush of the Tcl_Channels that may have
- * data enqueued.
+ * Ensure the thread-specific data is initialised as it is used in
+ * Tcl_FinalizeThread()
*/
- TclFinalizeIOSubsystem();
-
+
+ (void) TCL_TSD_INIT(&dataKey);
+
+ /*
+ * Now finalize the calling thread only (others are not safely
+ * reachable). Among other things, this triggers a flush of the
+ * Tcl_Channels that may have data enqueued.
+ */
+
+ Tcl_FinalizeThread();
+
TclpExit(status);
Tcl_Panic("OS exit failed!");
}