summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorferrieux <ferrieux@users.sourceforge.net>2012-07-23 18:50:05 (GMT)
committerferrieux <ferrieux@users.sourceforge.net>2012-07-23 18:50:05 (GMT)
commit52a0980ad1493619e824df3e4e9dea91c375bd74 (patch)
tree49b6e381d654290ff2cb4a923985c87ffaf4486b
parent616d71c51da0642d96de4ffd06ffc2d9027d5851 (diff)
downloadtcl-52a0980ad1493619e824df3e4e9dea91c375bd74.zip
tcl-52a0980ad1493619e824df3e4e9dea91c375bd74.tar.gz
tcl-52a0980ad1493619e824df3e4e9dea91c375bd74.tar.bz2
[Bug 3545365]: Never try a bg-flush on a dead channel, just like before 2011-08-17.
-rw-r--r--ChangeLog5
-rw-r--r--generic/tclIO.c5
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 5c8c50a..1175302 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-07-23 Alexandre Ferrieux <ferrieux@users.sourceforge.net>
+
+ * generic/tclIO.c: [Bug 3545365]: Never try a bg-flush on a dead
+ channel, just like before 2011-08-17.
+
2012-07-19 Joe Mistachkin <joe@mistachkin.com>
* generic/tclTest.c: Fix several more missing mutex-locks in
diff --git a/generic/tclIO.c b/generic/tclIO.c
index ea6c2d7..87d5727 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -427,7 +427,10 @@ TclFinalizeIOSubsystem(void)
statePtr != NULL;
statePtr = statePtr->nextCSPtr) {
chanPtr = statePtr->topChanPtr;
- if (!GotFlag(statePtr, CHANNEL_INCLOSE | CHANNEL_CLOSED | CHANNEL_DEAD)
+ if (GotFlag(statePtr, CHANNEL_DEAD)) {
+ continue;
+ }
+ if (!GotFlag(statePtr, CHANNEL_INCLOSE | CHANNEL_CLOSED )
|| GotFlag(statePtr, BG_FLUSH_SCHEDULED)) {
ResetFlag(statePtr, BG_FLUSH_SCHEDULED);
active = 1;