[Buildbot-devel] Getting buildbot to kill all subprocesses

Ian Zimmerman itz at clustrix.com
Fri Mar 5 23:20:13 UTC 2010


On Fri, 5 Mar 2010 14:44:43 -0800
Uma Sridharan <uma285 at gmail.com> wrote:

> So the only workaround is using twisted's spawnprocess? When buildbot
> starts a process, does twisted set *setpgrp* while buildbot does
> os.kill when the process is killed? I am confused as to whether
> buildbot or twisted does the kill. And the exising way of killing
> processes should work if background processes are not spawned?
> 
> On Fri, Mar 5, 2010 at 1:04 PM, <exarkun at twistedmatrix.com> wrote:
> 
> > On 08:52 pm, chris at atlee.ca wrote:
> > >buildbot should probably be doing something like setpgrp when it
> > >starts a process so that the entire process group can be killed
> > >properly.
> >
> > Twisted's spawnProcess API makes something like this available (it
> > actually does a setsid, but same idea).  Unfortunately it forces
> > you to use a pty if you want this, which isn't so cool.  I'd love
> > it if these two features were available independently of each
> > other.  Too many other things on my plate these days, though.
> >
> > Also, there's the obscure case where buildbot runs a process that
> > runs processes that fiddle with their process group, and that would
> > break this feature.  Not many things should be doing this, so it's
> > probably not a big deal, but it's worth keeping in mind that it's
> > not foolproof.
> >
> > Jean-Paul
> >
> >
> > ------------------------------------------------------------------------------
> > 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
> >

Looking at the source (in slave/commands.py), I agree with Jean-Paul:

just use usePTY=True in your ShellCommand step.  It should work.

Ian




More information about the devel mailing list