summaryrefslogtreecommitdiffstats
path: root/generic/tclIO.c
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2023-04-18 02:55:05 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2023-04-18 02:55:05 (GMT)
commit60c1da90cc4a650fd67b3ae3c10656611d78dfb2 (patch)
tree918764ee40273df634d7155df3424ec6b122db87 /generic/tclIO.c
parente645e12652b53c5aa9b86783f6b7b9d3db3be9ea (diff)
parent6f003899fecfb7886609e740a4539109cc92144c (diff)
downloadtcl-60c1da90cc4a650fd67b3ae3c10656611d78dfb2.zip
tcl-60c1da90cc4a650fd67b3ae3c10656611d78dfb2.tar.gz
tcl-60c1da90cc4a650fd67b3ae3c10656611d78dfb2.tar.bz2
Merge trunk
Diffstat (limited to 'generic/tclIO.c')
-rw-r--r--generic/tclIO.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index 04d01ed..74f90c5 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -4616,7 +4616,7 @@ Tcl_GetsObj(
if (GotFlag(statePtr, CHANNEL_ENCODING_ERROR)) {
UpdateInterest(chanPtr);
- ResetFlag(statePtr, CHANNEL_ENCODING_ERROR);
+ ResetFlag(statePtr, CHANNEL_EOF|CHANNEL_BLOCKED);
Tcl_SetErrno(EILSEQ);
return TCL_INDEX_NONE;
}
@@ -5941,6 +5941,7 @@ DoReadChars(
int factor = UTF_EXPANSION_FACTOR;
if (GotFlag(statePtr, CHANNEL_ENCODING_ERROR)) {
+ ResetFlag(statePtr, CHANNEL_EOF|CHANNEL_STICKY_EOF|CHANNEL_BLOCKED);
/* TODO: We don't need this call? */
UpdateInterest(chanPtr);
Tcl_SetErrno(EILSEQ);
@@ -6117,6 +6118,7 @@ finish:
* succesfully red before the error. Return an error so that callers
* like [read] can also return an error.
*/
+ ResetFlag(statePtr, CHANNEL_EOF|CHANNEL_ENCODING_ERROR);
Tcl_SetErrno(EILSEQ);
copied = -1;
}