summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorferrieux <ferrieux@users.sourceforge.net>2011-09-21 20:54:26 (GMT)
committerferrieux <ferrieux@users.sourceforge.net>2011-09-21 20:54:26 (GMT)
commit55d006f52db784e77fdc99b6bcaceeae689da92c (patch)
treea35e2c748975016911168d571a82972f4078b3c4
parentfa18389469985cb82730db620495c814e434e619 (diff)
downloadtcl-55d006f52db784e77fdc99b6bcaceeae689da92c.zip
tcl-55d006f52db784e77fdc99b6bcaceeae689da92c.tar.gz
tcl-55d006f52db784e77fdc99b6bcaceeae689da92c.tar.bz2
[Bug 3412487]: Now short reads are allowed in synchronous fcopy, avoid mistaking them as nonblocking ones.
-rw-r--r--ChangeLog5
-rw-r--r--generic/tclIO.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 25a96be..836b43f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-09-21 Alexandre Ferrieux <ferrieux@users.sourceforge.net>
+
+ * unix/tclIO.c: [Bug 3412487]: Now short reads are allowed in
+ synchronous fcopy, avoid mistaking them as nonblocking ones.
+
2011-09-21 Andreas Kupries <andreask@activestate.com>
* generic/tclIORTrans.c (ForwardOpToOwnerThread): Fixed the
diff --git a/generic/tclIO.c b/generic/tclIO.c
index ae1b89a..082cf70 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -9215,8 +9215,8 @@ CopyData(
if ((size == 0) && Tcl_Eof(inChan) && !(cmdPtr && (mask == 0))) {
break;
}
- if (((!Tcl_Eof(inChan)) || (cmdPtr && (mask == 0))) &&
- !(mask & TCL_READABLE)) {
+ if (cmdPtr && (!Tcl_Eof(inChan) || (mask == 0)) &&
+ !(mask & TCL_READABLE)) {
if (mask & TCL_WRITABLE) {
Tcl_DeleteChannelHandler(outChan, CopyEventProc, csPtr);
}