[Buildbot-devel] Slave not recognizing process end

Dustin J. Mitchell dustin at zmanda.com
Mon Jan 4 01:59:41 UTC 2010


Jean-Paul is right - Twisted makes it possible to avoid any race with
process exit, since you can signal a zombie process (one that has
exited but not yet been wait()ed on), and since Twisted is careful to
wait() on processes in the main thread.  So it's perfectly fine to
assume that if ShellCommandPP.processExited has not been called, the
process is still alive (or undead, at least).

So the best solution here is to make kill() do nothing if the process
has already exited.  The ShellCommand.finished() method is called when
the process exits, so it should be pretty straightforward to add a
conditional to ShellCommand.kill.  Martin, do you want to give it a
try?

Dustin

-- 
Open Source Storage Engineer
http://www.zmanda.com




More information about the devel mailing list