[Buildbot-commits] [Buildbot] #1796: Need to support killing a process group without usePTY=True

Buildbot nobody at buildbot.net
Sat Feb 5 23:38:40 UTC 2011

#1796: Need to support killing a process group without usePTY=True
Reporter:  dustin   |      Owner:  dustin
    Type:  defect   |     Status:  new
Priority:  major    |  Milestone:  0.8.4
 Version:  0.8.3p1  |   Keywords:  kill
 It seems that usePTY is bad mojo, for reasons I don't understand very
 well.  There are lots of bugs (#158, #284, #198, #255) about it causing
 problems for things like 'rm -rf'.  And, let's be honest, rm doesn't need
 its own terminal.

 However, the ability to kill a whole process group when a timeout occurs
 *is* useful.  This is particularly useful when the parent process has
 already exited, and child processes are keeping pipes open, as buildslave
 cannot kill those children.

 I think the right thing to do here is to put the child processes into a
 process group even when usePTY=False.

 17:19 <+ayust|home`> It's really straightforward, really... just in the
 main python process that manages all the other sandbox processes,
 17:19 <+ayust|home`>     # Make ourselves a process group leader
 17:19 <+ayust|home`>     os.setpgid(os.getpid(), 0)

Ticket URL: <http://trac.buildbot.net/ticket/1796>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation

More information about the Commits mailing list