[Buildbot-devel] Getting buildbot to kill all subprocesses

Ian Zimmerman itz at clustrix.com
Fri Mar 5 17:49:24 UTC 2010


On Thu, 4 Mar 2010 19:15:31 -0800
Uma Sridharan <uma285 at gmail.com> wrote:

> I have a shell script test.sh  that has the following.
> sleep 20 & sleep 30 & sleep 40
> 
> When I do a stop build, it just kills test.sh and not sleep
> processes. I see that the way it does now is using os.kill(-pid) in
> commands.py file. Does os.killpg(pid) have any effect at all?
> Where/Which file has this kill -TERM -${ROOT_PID} found?

That was my "translation" of the os.kill* because I assumed a shell
command would be easier to understand.

Both os.kill(-pid) and os.killpg(pid) should do exactly the same
thing.  I guess buildbot just tries everything possible because it's an
area where not all Unixen are in agreement.

is the & above literal?  Are you sure you don't mean && ?

Ian




More information about the devel mailing list