Attachment "tclio.patch" to
ticket [1323992fff]
added by
hobbs
2005-10-14 03:08:01.
Index: generic/tclIO.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclIO.c,v
retrieving revision 1.61.2.12
diff -u -r1.61.2.12 tclIO.c
--- generic/tclIO.c 4 Oct 2005 18:15:09 -0000 1.61.2.12
+++ generic/tclIO.c 13 Oct 2005 20:06:55 -0000
@@ -2707,10 +2707,16 @@
* file-events still sitting in the event queue of the current thread.
* We deliberately do not call UpdateInterest() because this could
* re-schedule new events if the channel still needs to be flushed.
+ * This should happen all the time, but Linux 2.4 systems seem to lose
+ * the flush on close in some cases (socket-9.2 socket-11.3) if this is
+ * used, so restrict it to TCL_THREADS, where you can otherwise crash
+ * numerous systems. [Bug 1323992]
*/
-
+
statePtr->interestMask = 0;
+#ifdef TCL_THREADS
(chanPtr->typePtr->watchProc)(chanPtr->instanceData, 0);
+#endif
/*
* Remove any EventScript records for this channel.