diff options
author | hobbs <hobbs@noemail.net> | 1999-12-08 03:49:50 (GMT) |
---|---|---|
committer | hobbs <hobbs@noemail.net> | 1999-12-08 03:49:50 (GMT) |
commit | 794a440bd56e982dce52543d9ceaa34feb2f677a (patch) | |
tree | 5dccefdd87861f6b6c2083252462cb86cc51f139 /generic/tclIO.c | |
parent | 73f7593362e41bca4d7d263753bc152ff9fd7e44 (diff) | |
download | tcl-794a440bd56e982dce52543d9ceaa34feb2f677a.zip tcl-794a440bd56e982dce52543d9ceaa34feb2f677a.tar.gz tcl-794a440bd56e982dce52543d9ceaa34feb2f677a.tar.bz2 |
* generic/tclDate.c:
* unix/Makefile.in: fixed make gendate to swap const with CONST
so it uses the Tcl defined CONST type [Bug: 3521]
* generic/tclIO.c: removed panic that could occur in FlushChannel
when a "blocking" channel would receive EAGAIN, instead treating
it the same as non-blocking. [Bug: 3773]
* generic/tclUtil.c: fixed Tcl_ScanCountedElement to not step
beyond the end of the counted string [Bug: 3336]
FossilOrigin-Name: b39a92cac1dd381b762fa8e78a40042bb2ea77c3
Diffstat (limited to 'generic/tclIO.c')
-rw-r--r-- | generic/tclIO.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c index 183c372..7ef54fb 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.17 1999/12/01 02:45:02 hobbs Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.18 1999/12/08 03:49:52 hobbs Exp $ */ #include "tclInt.h" @@ -2321,16 +2321,18 @@ FlushChannel(interp, chanPtr, calledFromAsyncFlush) */ if ((errorCode == EWOULDBLOCK) || (errorCode == EAGAIN)) { - if (chanPtr->flags & CHANNEL_NONBLOCKING) { - if (!(chanPtr->flags & BG_FLUSH_SCHEDULED)) { - chanPtr->flags |= BG_FLUSH_SCHEDULED; - UpdateInterest(chanPtr); - } - errorCode = 0; - break; - } else { - panic("Blocking channel driver did not block on output"); - } + /* + * This used to check for CHANNEL_NONBLOCKING, and panic + * if the channel was blocking. However, it appears + * that setting stdin to -blocking 0 has some effect + * on the stdout when it's a tty channel + */ + if (!(chanPtr->flags & BG_FLUSH_SCHEDULED)) { + chanPtr->flags |= BG_FLUSH_SCHEDULED; + UpdateInterest(chanPtr); + } + errorCode = 0; + break; } /* |