summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-03-09 09:19:25 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-03-09 09:19:25 (GMT)
commit764ef9b409175a603666871249e5991dcb7cbd50 (patch)
tree8e64debae31f8198926455baff5a0cb81ac35694
parentc197ddb3b23392d20db4eebe164cab63ec46cfeb (diff)
parent8aca3246abd4f40476a6f99fce4ee021703a71e7 (diff)
downloadtcl-764ef9b409175a603666871249e5991dcb7cbd50.zip
tcl-764ef9b409175a603666871249e5991dcb7cbd50.tar.gz
tcl-764ef9b409175a603666871249e5991dcb7cbd50.tar.bz2
Merge 8.6
-rw-r--r--unix/tclUnixChan.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c
index 837aa59..4cb9af0 100644
--- a/unix/tclUnixChan.c
+++ b/unix/tclUnixChan.c
@@ -282,12 +282,15 @@ FileInputProc(
* nonblocking, the read will never block.
*/
- bytesRead = read(fsPtr->fd, buf, (size_t) toRead);
- if (bytesRead >= 0) {
- return bytesRead;
+ do {
+ bytesRead = read(fsPtr->fd, buf, (size_t) toRead);
+ } while ((bytesRead < 0) && (errno == EINTR));
+
+ if (bytesRead < 0) {
+ *errorCodePtr = errno;
+ return -1;
}
- *errorCodePtr = errno;
- return -1;
+ return bytesRead;
}
/*