mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-19 08:53:54 +08:00
fix manager crash when sending signal to a dead proc
old-commit-hash: 87d7f51e3e
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user