summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--process.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/process.c b/process.c
index f5d8497..6c29423 100644
--- a/process.c
+++ b/process.c
@@ -3339,8 +3339,11 @@ recv_child_error(int fd, int *statep, VALUE *excp, int *errp, char *errmsg, size
}
#define READ_FROM_CHILD(ptr, len) \
(NIL_P(io) ? read(fd, (ptr), (len)) : rb_io_bufread(io, (ptr), (len)))
- if ((size = READ_FROM_CHILD(&err, sizeof(err))) < 0) {
+ while ((size = READ_FROM_CHILD(&err, sizeof(err))) < 0) {
err = errno;
+ if (err != EINTR) {
+ break;
+ }
}
*errp = err;
if (size == sizeof(err) &&