[Buildbot-devel] Getting buildbot to kill all subprocesses

Ian Zimmerman itz at clustrix.com
Fri Mar 5 01:14:29 UTC 2010


On Thu, 4 Mar 2010 16:39:54 -0800
Uma Sridharan <uma285 at gmail.com> wrote:

> On linux. I notice that stop build kills children but not
> grandchildren processes.
> 

Ah.  How are these grandchildren started?

Buildbot tries to do something like this:

kill -TERM -${ROOT_PID}

where ROOT_PID is the command directly spawned.  That is, it tries to
kill the _process group_ headed by that process.

That will fail of some descendant creates its own process group.
Daemon processes and such do that.  We face the same situation and we
have to take care of it by keeping track of the descendant processes
ourselves, plus installing a signal handler in the spawned process that
kills all the descendants.

Ian.




More information about the devel mailing list