summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-07-08 13:45:09 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-07-08 13:45:09 (GMT)
commitd5ffff621454dd0faed32b101f845006bbaef40b (patch)
tree435e03d32cae768a23b54d64a1eda4ab26dd2be6 /generic
parente1b54e0e11cd78052dd30856d3678abb3226ca3a (diff)
downloadtcl-d5ffff621454dd0faed32b101f845006bbaef40b.zip
tcl-d5ffff621454dd0faed32b101f845006bbaef40b.tar.gz
tcl-d5ffff621454dd0faed32b101f845006bbaef40b.tar.bz2
The write and flush operations of reflected transforms ([chan push]) have
been converting all lower level channel errors from Tcl_WriteRaw() into EINVAL. Generally this is a perplexing discard of useful information, but worse it interferes with the EAGAIN signalling that is required to manage the BLOCKED state of a nonblocking channel. Thanks to aspect for demo scripts that pointed to the bug.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclIORTrans.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclIORTrans.c b/generic/tclIORTrans.c
index d2707a1..45ee08d 100644
--- a/generic/tclIORTrans.c
+++ b/generic/tclIORTrans.c
@@ -3178,7 +3178,7 @@ TransformWrite(
}
if (res < 0) {
- *errorCodePtr = EINVAL;
+ *errorCodePtr = Tcl_GetErrno();
return 0;
}
@@ -3288,7 +3288,7 @@ TransformFlush(
}
if (res < 0) {
- *errorCodePtr = EINVAL;
+ *errorCodePtr = Tcl_GetErrno();
return 0;
}