[Buildbot-devel] Getting buildbot to kill all subprocesses

Chris AtLee chris at atlee.ca
Fri Mar 5 20:52:44 UTC 2010


buildbot should probably be doing something like setpgrp when it
starts a process so that the entire process group can be killed
properly.

On Fri, Mar 5, 2010 at 3:40 PM, Uma Sridharan <uma285 at gmail.com> wrote:
> 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
>
>
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Buildbot-devel mailing list
> Buildbot-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/buildbot-devel
>
>




More information about the devel mailing list