From fa9df063be85647f595d21ad8c51e20ec04061e3 Mon Sep 17 00:00:00 2001 From: dgp Date: Tue, 8 Jul 2014 13:45:09 +0000 Subject: 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. --- generic/tclIORTrans.c | 4 ++-- 1 file 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; } -- cgit v0.12