summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixChan.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-04-14 08:47:53 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-04-14 08:47:53 (GMT)
commit7f42387e71a69b938ecd25945d10f01f6e39bcc7 (patch)
treed6de8446022309740483d0f2db7f089749623f34 /unix/tclUnixChan.c
parent9ffcf83c49f17eca5cd2005902d378ac59aa7adf (diff)
parentccfe3f47fd0a170a819d29e0b22bba0003546796 (diff)
downloadtcl-7f42387e71a69b938ecd25945d10f01f6e39bcc7.zip
tcl-7f42387e71a69b938ecd25945d10f01f6e39bcc7.tar.gz
tcl-7f42387e71a69b938ecd25945d10f01f6e39bcc7.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 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;
}
/*