diff options
author | dgp <dgp@users.sourceforge.net> | 2014-10-10 19:44:54 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2014-10-10 19:44:54 (GMT) |
commit | 4977df535f65baabad14a446107f94bbdace5dfd (patch) | |
tree | 00c2387962f5daacc8bc8939916cc1a1eee7955c /generic | |
parent | 182bace1e3066600b76ac9a242df2a4803f51f07 (diff) | |
download | tcl-4977df535f65baabad14a446107f94bbdace5dfd.zip tcl-4977df535f65baabad14a446107f94bbdace5dfd.tar.gz tcl-4977df535f65baabad14a446107f94bbdace5dfd.tar.bz2 |
[ed29c4da21] Completed fix for [chan copy] handling [chan blocked].
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclIO.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c index 3d36d45..2810372 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -9020,7 +9020,7 @@ MBRead( } code = GetInput(inStatePtr->topChanPtr); - if (code == 0) { + if (code == 0 || GotFlag(inStatePtr, CHANNEL_BLOCKED)) { return TCL_OK; } else { MBError(csPtr, TCL_READABLE, code); @@ -9270,6 +9270,10 @@ CopyData( csPtr); } if (size == 0) { + if (!GotFlag(inStatePtr, CHANNEL_NONBLOCKING)) { + /* We allowed a short read. Keep trying. */ + continue; + } if (bufObj != NULL) { TclDecrRefCount(bufObj); bufObj = NULL; |