summaryrefslogtreecommitdiffstats
path: root/bin/sh/jobs.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/sh/jobs.c')
-rw-r--r--bin/sh/jobs.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/bin/sh/jobs.c b/bin/sh/jobs.c
index 4ff5093..b6ea4da 100644
--- a/bin/sh/jobs.c
+++ b/bin/sh/jobs.c
@@ -495,14 +495,10 @@ waitcmdloop(struct job *job)
in_waitcmd++;
do {
if (job != NULL) {
- if (job->state) {
+ if (job->state == JOBDONE) {
status = job->ps[job->nprocs - 1].status;
if (WIFEXITED(status))
retval = WEXITSTATUS(status);
-#if JOBS
- else if (WIFSTOPPED(status))
- retval = WSTOPSIG(status) + 128;
-#endif
else
retval = WTERMSIG(status) + 128;
if (! iflag || ! job->changed)
OpenPOWER on IntegriCloud