From 2fe20f5e48020a4a75490b616145c4327380e964 Mon Sep 17 00:00:00 2001 From: Jonathan Griffin Date: Tue, 15 Dec 2009 20:21:51 -0500 Subject: [PATCH] Bug 534934 - mochitest-ipcplugins: OSError: [Errno 10] No child process, r=bsmedberg --- build/automation.py.in | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/build/automation.py.in b/build/automation.py.in index 59664cd5e5a9..ceebbac4fcb5 100644 --- a/build/automation.py.in +++ b/build/automation.py.in @@ -526,15 +526,17 @@ else: # The method throws OSError if the PID is invalid, which we catch below. os.kill(pid, 0) - # wait on it to see if it's a zombie + # Wait on it to see if it's a zombie. This can throw OSError.ECHILD if + # the process terminates before we get to this point. wpid, wstatus = os.waitpid(pid, os.WNOHANG) if wpid == 0: return True return False except OSError, err: - # Catch the one error we expect from os.kill, and re-raise any others - if err.errno == errno.ESRCH: + # Catch the errors we might expect from os.kill/os.waitpid, + # and re-raise any others + if err.errno == errno.ESRCH or err.errno == errno.ECHILD: return False raise