diff options
-rw-r--r-- | bin/sh/jobs.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/bin/sh/jobs.c b/bin/sh/jobs.c index db13855..2fd7aaa 100644 --- a/bin/sh/jobs.c +++ b/bin/sh/jobs.c @@ -966,13 +966,8 @@ dowait(int block, struct job *job) sig = WTERMSIG(status); } if (sig != 0 && sig != SIGINT && sig != SIGPIPE) { - if (jp->foreground) { -#if JOBS - if (WIFSTOPPED(status)) - i = WSTOPSIG(status); - else -#endif - i = WTERMSIG(status); + if (thisjob->foreground && !WIFSTOPPED(status)) { + i = WTERMSIG(status); if ((i & 0x7F) < NSIG && sys_siglist[i & 0x7F]) out1str(sys_siglist[i & 0x7F]); else |