summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixChan.c
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)
commit641877061137b3c9e658b1b9378d4f56ffafa8f7 (patch)
tree8e64debae31f8198926455baff5a0cb81ac35694 /unix/tclUnixChan.c
parentaa43d9d926d1227363a052f38bbf94ad7561138d (diff)
parent27ecca46c849a77dde80630d6b9318774a4aca99 (diff)
downloadtcl-641877061137b3c9e658b1b9378d4f56ffafa8f7.zip
tcl-641877061137b3c9e658b1b9378d4f56ffafa8f7.tar.gz
tcl-641877061137b3c9e658b1b9378d4f56ffafa8f7.tar.bz2
Merge 8.6
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 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;
}
/*