[Buildbot-devel] Getting buildbot to kill all subprocesses

Uma Sridharan uma285 at gmail.com
Fri Mar 5 20:40:45 UTC 2010


The & is literal. I have 3 sleep processes seperated by & in a shell script.
When I run the shell script and do ps -e, I get 4 processes listed. shell
script + 3 sleep processes. When I do a stop build ( using os.kill(-pid) or
os.killpg(pid)) it only kills the shell process. Not the sleep processes.

On Fri, Mar 5, 2010 at 9:49 AM, Ian Zimmerman <itz at clustrix.com> wrote:

> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20100305/abbd7d94/attachment.html>


More information about the devel mailing list