Tcl Source Code

Artifact [8c4393d8b5]
Login

Artifact 8c4393d8b5aa2c1ceb4781a918cd6055e0bbfa6d:

Attachment "pt.patch" to ticket [1359094fff] added by jcw 2005-11-17 23:39:21.
diff -u -r1.94 tclIO.c
--- generic/tclIO.c     26 Aug 2005 22:11:16 -0000      1.94
+++ generic/tclIO.c     3 Oct 2005 12:44:03 -0000
@@ -201,7 +201,6 @@
     for (statePtr = tsdPtr->firstCSPtr; statePtr != (ChannelState *) NULL;
            statePtr = nextCSPtr) {
        chanPtr = statePtr->topChanPtr;
-       nextCSPtr = statePtr->nextCSPtr;

        /*
         * Set the channel back into blocking mode to ensure that we wait for
@@ -261,6 +260,12 @@
            chanPtr->instanceData = (ClientData) NULL;
            statePtr->flags |= CHANNEL_DEAD;
        }
+
+       /*
+        * We look for the next pointer now in case we had one closed on up during
+        * the current channel's closeproc. (eg: rechan extension). [PT]
+        */
+       nextCSPtr = statePtr->nextCSPtr;
     }
     TclpFinalizePipes();
 }