[Bugfix] Keep force-killing the process tree when a child exits mid-walk (#59984)
Signed-off-by: Lanze Liu <lanzetech@gmail.com> Co-authored-by: Ning Xie <andy.xning@gmail.com>
This commit is contained in:
@@ -221,7 +221,7 @@ def kill_process_tree(pid: int):
|
||||
|
||||
# Send SIGKILL to all children first
|
||||
for child in children:
|
||||
with contextlib.suppress(ProcessLookupError):
|
||||
with contextlib.suppress(ProcessLookupError, psutil.NoSuchProcess):
|
||||
logger.warning(
|
||||
"[shutdown] force killing sub process %s pid %d",
|
||||
child.name(),
|
||||
|
||||
Reference in New Issue
Block a user