2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-13 12:22:17 +00:00
K. Noel Belcourt 27447ae6fa Another patch to fix the -lx timeout code. Some actions spawn
sub-processes after bjam forks a new process (for example, after
g++ is forked by bjam, g++ then forks sub-processes like cc1plus).
The timeout code would kill the g++ process, but might not kill
the subprocesses spawned by g++.

I fixed this problem by making the bjam fork'ed process (g++) a 
session leader by calling setsid() before calling exec.  The setsid 
call, in essence, gives all child processes a parent process id 
(ppid) of the g++ process id.  This guarantees that killing g++ 
will kill all child processes spawned by g++ as well.

One last comment on the maximum process time before a process is actually
killed.  The worst case process elapsed time is 2x seconds if -lx is
given.  The reason is that a process might be one second away from being
killed and, if there's no other signal activity, the select function will
wait x seconds before timing out and killing any active processes.  So
if you say -lx and monitor a build known to have lengthy processes, you 
may see a process with up to 2x seconds of time before it is killed.



[SVN r39467]
2007-09-21 22:38:17 +00:00
2004-11-29 07:29:19 +00:00
2007-09-18 11:44:13 +00:00
2007-09-05 08:03:17 +00:00
2007-01-06 11:36:52 +00:00
2007-08-27 07:00:18 +00:00
2007-09-11 19:36:48 +00:00
Description
Mirrored via gitea-mirror
39 MiB
Languages
C++ 73.8%
Python 22.6%
C 1.6%
Batchfile 0.7%
Shell 0.6%
Other 0.6%