catch osexceptions where process has already stopped

This commit is contained in:
Joshua Hesketh 2013-09-02 16:06:01 +10:00
parent 105af4186e
commit 721781d111

View File

@ -175,7 +175,10 @@ def execute_to_log(cmd, logfile, timeout=-1,
for fd, descriptor in descriptors.items():
poll_obj.unregister(fd)
os.close(fd)
p.kill()
try:
p.kill()
except OSError:
pass
logger.info('[script exit code = %d]' % p.returncode)