mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-05-27 10:26:05 +02:00
23238: jobs didn't get deleted if they weren't printed
This commit is contained in:
parent
4b7b7f56f1
commit
9fb47cff9d
|
@ -1,3 +1,9 @@
|
|||
2007-03-27 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* 23238: Src/jobs.c: job didn't get deleted from table
|
||||
if it wasn't printed, leading to obscure problems with current
|
||||
jobs.
|
||||
|
||||
2007-03-26 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* unposted (follow-on from 23228): Doc/Zsh/calsys.yo,
|
||||
|
|
17
Src/jobs.c
17
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
|
||||
|
|
Loading…
Reference in New Issue