Bugfix: '-r' has a better behaviour when all the jobs finished.
--- a/buglist.bug Wed Jul 16 07:02:48 2008 +0200
+++ b/buglist.bug Wed Jul 16 07:09:13 2008 +0200
@@ -4,6 +4,4 @@
4 5 fixed Terminal Control-C to a "ts -nf myprogram" breaks the queue.
8 1 fixed Removing a job doesn't wake up its "waiters" \nIn a terminal: ts -w 15\nIn another: ts -r 15\n\nThe first terminal doesn't wake up.
9 2 fixed The "-t" option doesn't die after the application dies. \n-t could have, moreover, the behaviour of -w
-13 3 open Wrong output message on -t D State Output E-Level Times(r/u/s) Command\n17 finished /tmp/ts-out.Ra7s9g 1 5.31/1.23/1.72 clearmake bcd_io_bcd_io_src_io_bsd_server_bsd bcd_io_bcd_io_src_io_bsd_test_server_rserver\n18 skipped (no output) && clearmake bcd_io_bcd_io_src_io_bsd_io_testbsd_engine\n19 skipped (no output) && putio.sh 16.23.86.24 bin/io_testbsd_engine bin/io_bsd_server_rserver\n\n$ ts -t\nError in the request: Job -1 was skipped due to a dependency.\n\nThere should say "The last job was skipped..."
14 -3 open '-t' doesn't show 10 lines, but more.
-15 1 open 'ts -r' show a strange message, when all jobs are finished. \nit says something about cannot remove a jobid - a strange jobid.
--- a/jobs.c Wed Jul 16 07:02:48 2008 +0200
+++ b/jobs.c Wed Jul 16 07:09:13 2008 +0200
@@ -780,12 +780,10 @@
p = firstjob;
if (p != 0)
{
- jobid = p->jobid;
while (p->next != 0)
{
before_p = p;
p = p->next;
- jobid = p->jobid;
}
} else
{
@@ -793,11 +791,9 @@
p = first_finished_job;
if (p)
{
- jobid = p->jobid;
while (p->next != 0)
{
before_p = p;
- jobid = p->jobid;
p = p->next;
}
}
@@ -826,11 +822,13 @@
before_p = p;
p = p->next;
}
+ if (p->jobid != jobid)
+ p = 0;
}
}
}
- if (p == 0 || p->state == RUNNING || p == firstjob || p->jobid != jobid)
+ if (p == 0 || p->state == RUNNING || p == firstjob)
{
char tmp[50];
if (jobid == -1)