diff options
author | andreas_kupries <andreas_kupries@noemail.net> | 2004-04-23 23:40:57 (GMT) |
---|---|---|
committer | andreas_kupries <andreas_kupries@noemail.net> | 2004-04-23 23:40:57 (GMT) |
commit | 9b29a35c1937cad1c163d6da595f424a4cfadc2c (patch) | |
tree | f1b858e5ab7fa64e398ca3e41444b812b9ac18e9 /generic/tclIO.c | |
parent | 3e600cfc7a29a6a33b5b0e3bfa39fe9175696632 (diff) | |
download | tcl-9b29a35c1937cad1c163d6da595f424a4cfadc2c.zip tcl-9b29a35c1937cad1c163d6da595f424a4cfadc2c.tar.gz tcl-9b29a35c1937cad1c163d6da595f424a4cfadc2c.tar.bz2 |
* generic/tclIO.c (Tcl_SetChannelOption): Fixed [SF Tcl Bug
930851]. When changing the eofchar we have to zap the related
flags to prevent them from prematurely aborting the next read.
FossilOrigin-Name: 3404cd2712188f22a5f5115fad1db4bc599c00d2
Diffstat (limited to 'generic/tclIO.c')
-rw-r--r-- | generic/tclIO.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c index 51a105b..2e10b99 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.61.2.3 2004/02/02 22:00:30 davygrvy Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.61.2.4 2004/04/23 23:40:58 andreas_kupries Exp $ */ #include "tclInt.h" @@ -6459,6 +6459,15 @@ Tcl_SetChannelOption(interp, chan, optionName, newValue) if (argv != NULL) { ckfree((char *) argv); } + + /* + * [SF Tcl Bug 930851] Reset EOF and BLOCKED flags. Changing + * the character which signals eof can transform a current eof + * condition into a 'go ahead'. Ditto for blocked. + */ + + statePtr->flags &= (~(CHANNEL_EOF | CHANNEL_STICKY_EOF | CHANNEL_BLOCKED)); + return TCL_OK; } else if ((len > 1) && (optionName[1] == 't') && (strncmp(optionName, "-translation", len) == 0)) { |