|
Boost-Build : |
From: K. Noel Belcourt (kbelco_at_[hidden])
Date: 2007-09-21 15:07:23
Hi,
I implemented the bjam -lx timeout support on unix (in execunix.c)
and just noticed a problem. With some compilers, like gcc, I was
able to kill the vfork'ed g++ process okay, but not the child
processes that g++ started (like cc1plus). To fix this problem, I
made the vfork'ed process a session leader by calling the setsid() on
the vforked process and changed the kill function to :
kill (-pid, SIGKILL);
which will kill all processes in the pid process group. From the
kill 2 man page :
If pid is less than -1, then sig is sent to every process in
the process group -pid.
Here's the patch to fix this problem which I tested with both tools/
jam/test/test.sh and by running the gcc-3.4.3 regression tests
manually to ensure all processes in the process group were killed.
If there's no objection, I'd like to commit this later today and then
notify the Boost Unix testers that they should check their systems
running Boost regression tests for zombie processes that didn't get
killed off properly.
Thanks.
-- Noel
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk