summaryrefslogtreecommitdiffstats
path: root/bin/sh/jobs.c
diff options
context:
space:
mode:
authortjr <tjr@FreeBSD.org>2002-12-14 01:08:04 +0000
committertjr <tjr@FreeBSD.org>2002-12-14 01:08:04 +0000
commit0423e8e00304d4fe38479e68d84649362c449fb6 (patch)
tree103118086d80225d3692619bbdd9111e278557f5 /bin/sh/jobs.c
parent1c7767c0c6727d617485636ac527df8828b48412 (diff)
downloadFreeBSD-src-0423e8e00304d4fe38479e68d84649362c449fb6.zip
FreeBSD-src-0423e8e00304d4fe38479e68d84649362c449fb6.tar.gz
When job control is disabled, never show the job id when reporting the
status of a background process that has terminated because of a signal.
Diffstat (limited to 'bin/sh/jobs.c')
-rw-r--r--bin/sh/jobs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/sh/jobs.c b/bin/sh/jobs.c
index d4e966c..129f372 100644
--- a/bin/sh/jobs.c
+++ b/bin/sh/jobs.c
@@ -968,7 +968,8 @@ dowait(int block, struct job *job)
sig = WTERMSIG(status);
}
if (sig != 0 && sig != SIGINT && sig != SIGPIPE) {
- if (thisjob->foreground && !WIFSTOPPED(status)) {
+ if (!mflag ||
+ (thisjob->foreground && !WIFSTOPPED(status))) {
i = WTERMSIG(status);
if ((i & 0x7F) < NSIG && sys_siglist[i & 0x7F])
out1str(sys_siglist[i & 0x7F]);
OpenPOWER on IntegriCloud