sh: Don't consider jobs -s/-p as reporting the status of jobs.
This ensures that something like j=$(jobs -p) does not prevent any status from being written to the terminal.
This commit is contained in:
parent
f35bb1a01e
commit
58c73bab93
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user