fix manager crash when sending signal to a dead proc

old-commit-hash: 87d7f51e3e
This commit is contained in:
Comma Device
2020-10-30 11:40:16 -07:00
parent c38b025395
commit bf54c5bf5c

View File

@@ -398,8 +398,10 @@ def cleanup_all_processes(signal, frame):
def send_managed_process_signal(name, sig):
if name not in running or name not in managed_processes:
if name not in running or name not in managed_processes or \
running[name].exitcode is not None:
return
cloudlog.info(f"sending signal {sig} to {name}")
os.kill(running[name].pid, sig)