diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-03-09 09:21:19 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-03-09 09:21:19 (GMT) |
commit | 12cd4e589cadcf44953e5bb6c9728c2e17d1f754 (patch) | |
tree | ba7a6316c4110f6bf41d78ed591f8cfee2522192 | |
parent | 45c19effdcaf63a5d2af6c559fdc50b6be14f710 (diff) | |
parent | 764ef9b409175a603666871249e5991dcb7cbd50 (diff) | |
download | tcl-12cd4e589cadcf44953e5bb6c9728c2e17d1f754.zip tcl-12cd4e589cadcf44953e5bb6c9728c2e17d1f754.tar.gz tcl-12cd4e589cadcf44953e5bb6c9728c2e17d1f754.tar.bz2 |
Merge 8.7
-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 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; } /* |