summaryrefslogtreecommitdiffstats
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)
commitfa9df063be85647f595d21ad8c51e20ec04061e3 (patch)
tree435e03d32cae768a23b54d64a1eda4ab26dd2be6
parentacfeb395d7d2f90fea8b4ddb58f20e4afb786b6e (diff)
downloadtcl-fa9df063be85647f595d21ad8c51e20ec04061e3.zip
tcl-fa9df063be85647f595d21ad8c51e20ec04061e3.tar.gz
tcl-fa9df063be85647f595d21ad8c51e20ec04061e3.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.
-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;
}