diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2007-03-27 10:56:53 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2007-03-27 10:56:53 +0000 |
commit | 9fb47cff9d394dc111aeae79a6c99723b1465249 (patch) | |
tree | 3303df251af1a710803f51ff1e5faa87ffbcd31e /Src/jobs.c | |
parent | 4b7b7f56f1cde7e317fce378d0d0e5c83686ff72 (diff) | |
download | zsh-9fb47cff9d394dc111aeae79a6c99723b1465249.tar.gz zsh-9fb47cff9d394dc111aeae79a6c99723b1465249.tar.xz zsh-9fb47cff9d394dc111aeae79a6c99723b1465249.zip |
23238: jobs didn't get deleted if they weren't printed
Diffstat (limited to 'Src/jobs.c')
-rw-r--r-- | Src/jobs.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/Src/jobs.c b/Src/jobs.c index 38666ef55..c201ecd96 100644 --- a/Src/jobs.c +++ b/Src/jobs.c @@ -806,7 +806,10 @@ should_report_time(Job j) * synch = 2 means called synchronously from jobs * * Returns 1 if some output was done. -*/ + * + * The function also deletes the job if it was done, even it + * is not printed. + */ /**/ int @@ -818,8 +821,18 @@ printjob(Job jn, int lng, int synch) int doneprint = 0; FILE *fout = (synch == 2) ? stdout : shout; - if (jn->stat & STAT_NOPRINT) + if (jn->stat & STAT_NOPRINT) { + if (jn->stat & STAT_DONE) { + deletejob(jn); + if (job == curjob) { + curjob = prevjob; + prevjob = job; + } + if (job == prevjob) + setprevjob(); + } return 0; + } /* * Wow, what a hack. Did I really write this? --- pws |