diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-03-09 09:19:25 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-03-09 09:19:25 (GMT) |
commit | 641877061137b3c9e658b1b9378d4f56ffafa8f7 (patch) | |
tree | 8e64debae31f8198926455baff5a0cb81ac35694 /unix/tclUnixChan.c | |
parent | aa43d9d926d1227363a052f38bbf94ad7561138d (diff) | |
parent | 27ecca46c849a77dde80630d6b9318774a4aca99 (diff) | |
download | tcl-641877061137b3c9e658b1b9378d4f56ffafa8f7.zip tcl-641877061137b3c9e658b1b9378d4f56ffafa8f7.tar.gz tcl-641877061137b3c9e658b1b9378d4f56ffafa8f7.tar.bz2 |
Merge 8.6
Diffstat (limited to 'unix/tclUnixChan.c')
-rw-r--r-- | unix/tclUnixChan.c | 13 |
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; } /* |