summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixChan.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-03-09 09:21:19 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-03-09 09:21:19 (GMT)
commit12cd4e589cadcf44953e5bb6c9728c2e17d1f754 (patch)
treeba7a6316c4110f6bf41d78ed591f8cfee2522192 /unix/tclUnixChan.c
parent45c19effdcaf63a5d2af6c559fdc50b6be14f710 (diff)
parent764ef9b409175a603666871249e5991dcb7cbd50 (diff)
downloadtcl-12cd4e589cadcf44953e5bb6c9728c2e17d1f754.zip
tcl-12cd4e589cadcf44953e5bb6c9728c2e17d1f754.tar.gz
tcl-12cd4e589cadcf44953e5bb6c9728c2e17d1f754.tar.bz2
Merge 8.7
Diffstat (limited to 'unix/tclUnixChan.c')
-rw-r--r--unix/tclUnixChan.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c
index f7b6b2b..25bc70f 100644
--- a/unix/tclUnixChan.c
+++ b/unix/tclUnixChan.c
@@ -274,12 +274,15 @@ FileInputProc(
* nonblocking, the read will never block.
*/
- bytesRead = read(fsPtr->fd, buf, toRead);
- if (bytesRead >= 0) {
- return bytesRead;
+ do {
+ bytesRead = read(fsPtr->fd, buf, toRead);
+ } while ((bytesRead < 0) && (errno == EINTR));
+
+ if (bytesRead < 0) {
+ *errorCodePtr = errno;
+ return -1;
}
- *errorCodePtr = errno;
- return -1;
+ return bytesRead;
}
/*