diff options
Diffstat (limited to 'bin/sh')
-rw-r--r-- | bin/sh/jobs.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/sh/jobs.c b/bin/sh/jobs.c index ac03c95..71e80f4 100644 --- a/bin/sh/jobs.c +++ b/bin/sh/jobs.c @@ -924,6 +924,8 @@ dowait(int block, struct job *job) } while ((pid == -1 && errno == EINTR && breakwaitcmd == 0) || (pid > 0 && WIFSTOPPED(status) && !iflag)); in_dowait--; + if (pid == -1 && errno == ECHILD && job != NULL) + job->state = JOBDONE; if (breakwaitcmd != 0) { breakwaitcmd = 0; if (pid <= 0) |