build: Fix OSError exception

When the Bazel subprocess exits unexpectedly, the wrapper script
gets an OSError exception while cleaning up the processes.

Ignore the OSError exception to make sure all subprocesses are
cleaned up properly.

Change-Id: I7c1062a900e70cfc2d90bd9695254ba80b07721b
Signed-off-by: John Moon <quic_johmoo@quicinc.com>
This commit is contained in:
John Moon 2022-11-28 13:37:07 -08:00
parent 77e6e012b8
commit 1a0df71fe8

View File

@ -36,8 +36,11 @@ class BazelBuilder:
def __del__(self):
for proc in self.process_list:
proc.kill()
proc.wait()
try:
proc.kill()
proc.wait()
except OSError:
pass
@staticmethod
def get_cross_cli_opts(toolchain):