summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bin/sh/jobs.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/bin/sh/jobs.c b/bin/sh/jobs.c
index c978e3d..54f72ea 100644
--- a/bin/sh/jobs.c
+++ b/bin/sh/jobs.c
@@ -417,13 +417,15 @@ showjobs(int change, int mode)
if (change && ! jp->changed)
continue;
showjob(jp, mode);
- jp->changed = 0;
- /* Hack: discard jobs for which $! has not been referenced
- * in interactive mode when they terminate.
- */
- if (jp->state == JOBDONE && !jp->remembered &&
- (iflag || jp != bgjob)) {
- freejob(jp);
+ if (mode == SHOWJOBS_DEFAULT || mode == SHOWJOBS_VERBOSE) {
+ jp->changed = 0;
+ /* Hack: discard jobs for which $! has not been
+ * referenced in interactive mode when they terminate.
+ */
+ if (jp->state == JOBDONE && !jp->remembered &&
+ (iflag || jp != bgjob)) {
+ freejob(jp);
+ }
}
}
}
OpenPOWER on IntegriCloud