[Buildbot-devel] Fwd: canceling a build?

Greg Ward gerg.ward+buildbot at gmail.com
Fri Feb 1 17:42:48 UTC 2008

On Feb 1, 2008 11:48 AM, Stefan Seefeld <seefeld at sympatico.ca> wrote:
> Really ? The toplevel make should 'own' all its child-processes, and
> when it dies, its children should die with it. You'd have to take extra
> steps to have a child process start a new process group. I don't think
> make does that.

That's what I thought at first too.  But my experiments on Linux have
demonstrated that "kill 5322" does *not* necessarily kill all of
process' 5322's children.  And when Buildbot stops a build, *or* when
you stop the slave Buildbot, any processes that are children of
Buildbot's children keep running.  Like I said, killing the process
group works for me.

I suspect that Buildbot needs two changes for this to work:
  * each build step should start a new process group (call
os.setsid()) after fork()ing
    but before exec()ing
  * when stopping a build step (e.g. on explicit user request, or when
the daemon is
    shutdown), Buildbot should kill the whole process group (negative
process ID)

Again, I think this is System V signal handling.  Not sure how modern BSDs work.


More information about the devel mailing list