summaryrefslogtreecommitdiff
path: root/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'process.c')
-rw-r--r--process.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/process.c b/process.c
index 0b9373a..5a7ce36 100644
--- a/process.c
+++ b/process.c
@@ -579,6 +579,7 @@ rb_syswait(pid)
{
RETSIGTYPE (*hfunc)(), (*qfunc)(), (*ifunc)();
int status;
+ int i;
#ifdef SIGHUP
hfunc = signal(SIGHUP, SIG_IGN);
@@ -588,7 +589,9 @@ rb_syswait(pid)
#endif
ifunc = signal(SIGINT, SIG_IGN);
- if (rb_waitpid(pid, 0, &status) < 0) rb_sys_fail("wait");
+ do {
+ i = rb_waitpid(pid, 0, &status);
+ } while (i == -1 && errno == EINTR);
#ifdef SIGHUP
signal(SIGHUP, hfunc);