Subject: Re: make: adding .KILL ?
To: Christos Zoulas <email@example.com>
From: David Laight <firstname.lastname@example.org>
Date: 11/01/2006 20:53:34
On Wed, Nov 01, 2006 at 03:43:12AM +0000, Christos Zoulas wrote:
> I don't like the SIGKILL and I don't understand the reason for the sleep()s
The sleeps are there to give the process time to get scheduled (and exit)
before the kill -9.
However the code ought to send all the jobs SIGTERM, then wait (and reap)
a bit for them to die, then (maybe) send SIGKILL - rather than sleeping
2 seconds for every job.
In any case make won't be looking for a job-token unless it has has
additional tasks to run (and hasn't reached its own job limit).
So you'd also have to catch SIGTERM itself and attempt to do the tidy up.
That will fall fould because the parent make is likely to SIGKILL it
while it is still waiting to terminate any children that are ignoring
You also need to treat the exited jobs in the normal way - ie delete
the (possibly partially made) target.
David Laight: email@example.com