From ec2150b2944edd7d805cbbeb40565aa1a8df70d0 Mon Sep 17 00:00:00 2001 From: Ke Bao Date: Sat, 20 Jul 2024 12:43:11 +0800 Subject: [PATCH] Fix kill process util (#666) --- python/sglang/srt/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/sglang/srt/utils.py b/python/sglang/srt/utils.py index a88aa894d..dfaf51a93 100644 --- a/python/sglang/srt/utils.py +++ b/python/sglang/srt/utils.py @@ -335,7 +335,7 @@ def kill_parent_process(): """Kill the parent process and all children of the parent process.""" current_process = psutil.Process() parent_process = current_process.parent() - children = current_process.children(recursive=True) + children = parent_process.children(recursive=True) for child in children: if child.pid != current_process.pid: os.kill(child.pid, 9)