summaryrefslogtreecommitdiffstats
path: root/bin/sh/jobs.c
diff options
context:
space:
mode:
authortjr <tjr@FreeBSD.org>2002-08-17 13:57:47 +0000
committertjr <tjr@FreeBSD.org>2002-08-17 13:57:47 +0000
commitaa14f489f215c5ecae9ed42b707ce304021826c7 (patch)
tree1736a682b5cf8e541fed22cc5457049206b2ae2c /bin/sh/jobs.c
parent795eb0b73a6816cb262136ba9793182baaa1478f (diff)
downloadFreeBSD-src-aa14f489f215c5ecae9ed42b707ce304021826c7.zip
FreeBSD-src-aa14f489f215c5ecae9ed42b707ce304021826c7.tar.gz
Show job control ID, command text, etc. when foreground processes are
suspended. This is a followup to rev. 1.51. MFC after: 1 week
Diffstat (limited to 'bin/sh/jobs.c')
-rw-r--r--bin/sh/jobs.c9
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
OpenPOWER on IntegriCloud