Avoid zombie processes when parallel builds fail (#11923)

This commit is contained in:
Felix von Drigalski
2024-02-04 08:56:38 +09:00
committed by GitHub
parent 9faf114ea1
commit ceb3b2a904

View File

@@ -94,7 +94,12 @@ class ParallelTasks:
proc = context.Process(target=self._process, args=(psend, task_func, arg))
self._procs[tid] = proc
self._precvsWaiting[tid] = precv
self._join_one()
try:
self._join_one()
except Exception:
# shutdown other child processes on failure
# (e.g. OSError: Failed to allocate memory)
self.terminate()
def join(self) -> None:
try: