Kill process group if orphans are still alive

after `proc.wait()`.

Thanks @natefoo for the suggestion.
This commit is contained in:
Nicola Soranzo
2019-08-30 12:08:10 +01:00
parent 0d7133349e
commit 4e15c46879
+2
View File
@@ -121,6 +121,8 @@ class LocalJobRunner(BaseJobRunner):
proc.wait() # reap
if terminated:
return
elif check_pg(proc.pid):
kill_pg(proc.pid)
finally:
with self._proc_lock:
self._procs.remove(proc)