summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorferrieux <ferrieux@users.sourceforge.net>2011-08-17 20:35:19 (GMT)
committerferrieux <ferrieux@users.sourceforge.net>2011-08-17 20:35:19 (GMT)
commit1d11a7f1fd50b863d05886dbe18ca3ed326e5df8 (patch)
tree16f9a76306580477ee6938b7d71fe10ac3b28c5d /generic
parent703f1a10e054dc8c26566bc3ad5fa463a5289be9 (diff)
downloadtcl-1d11a7f1fd50b863d05886dbe18ca3ed326e5df8.zip
tcl-1d11a7f1fd50b863d05886dbe18ca3ed326e5df8.tar.gz
tcl-1d11a7f1fd50b863d05886dbe18ca3ed326e5df8.tar.bz2
[Bug 2946474] Consistently resume backgrounded flushes+closes when exiting.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclIO.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index 78c1dc0..a19fde8 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -414,8 +414,8 @@ TclFinalizeIOSubsystem(void)
statePtr != NULL;
statePtr = statePtr->nextCSPtr) {
chanPtr = statePtr->topChanPtr;
- if (!GotFlag(statePtr, CHANNEL_INCLOSE | CHANNEL_CLOSED |
- CHANNEL_DEAD)) {
+ if (!GotFlag(statePtr, CHANNEL_INCLOSE | CHANNEL_CLOSED | CHANNEL_DEAD)
+ || GotFlag(statePtr, BG_FLUSH_SCHEDULED)) {
active = 1;
break;
}
@@ -458,6 +458,7 @@ TclFinalizeIOSubsystem(void)
* The refcount is greater than zero, so flush the channel.
*/
+ ResetFlag(statePtr, BG_FLUSH_SCHEDULED);
Tcl_Flush((Tcl_Channel) chanPtr);
/*