diff options
Diffstat (limited to 'Src/jobs.c')
-rw-r--r-- | Src/jobs.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Src/jobs.c b/Src/jobs.c index fdf69a960..4b9d66986 100644 --- a/Src/jobs.c +++ b/Src/jobs.c @@ -835,7 +835,11 @@ waitforpid(pid_t pid) /* child_block() around this loop in case #ifndef WNOHANG */ child_block(); /* unblocked in child_suspend() */ +#ifdef BROKEN_KILL_ESRCH + while (!errflag && (kill(pid, 0) >= 0 || (errno != ESRCH && errno != EINVAL))) { +#else /* not BROKEN_KILL_ESRCH */ while (!errflag && (kill(pid, 0) >= 0 || errno != ESRCH)) { +#endif /* BROKEN_KILL_ESRCH */ if (first) first = 0; else |