summaryrefslogtreecommitdiffstats
path: root/generic/tclIO.c
diff options
context:
space:
mode:
authorandreask@activestate.com <andreas_kupries>2004-04-23 23:38:40 (GMT)
committerandreask@activestate.com <andreas_kupries>2004-04-23 23:38:40 (GMT)
commit427ee53485a150c2347f2b3b9387bcf4dc5b59a7 (patch)
tree5b86fa67d119f5917e6e42389b7bcc8bbbdc9368 /generic/tclIO.c
parent18193b537ae93d858994d6d0065761f975d00025 (diff)
downloadtcl-427ee53485a150c2347f2b3b9387bcf4dc5b59a7.zip
tcl-427ee53485a150c2347f2b3b9387bcf4dc5b59a7.tar.gz
tcl-427ee53485a150c2347f2b3b9387bcf4dc5b59a7.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.
Diffstat (limited to 'generic/tclIO.c')
-rw-r--r--generic/tclIO.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index 9e33166..93bd0de 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.72 2004/04/06 22:25:51 dgp Exp $
+ * RCS: @(#) $Id: tclIO.c,v 1.73 2004/04/23 23:38:42 andreas_kupries Exp $
*/
#include "tclInt.h"
@@ -6480,6 +6480,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)) {