Skip to content

Commit 3a625b0

Browse files
committed
SIGKILL only with psutil / not windows
1 parent f25313a commit 3a625b0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tools/Python/mccodelib/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ def get_file_contents(filepath):
780780
except ImportError:
781781
psutil = None
782782

783-
def _kill_process_tree(pid, sig=signal.SIGKILL, timeout=3.0):
783+
def _kill_process_tree(pid, timeout=3.0):
784784
"""Kill process tree rooted at pid. Uses psutil if available, otherwise best-effort."""
785785
if psutil:
786786
try:
@@ -791,7 +791,7 @@ def _kill_process_tree(pid, sig=signal.SIGKILL, timeout=3.0):
791791
# send sig to children first
792792
for p in children:
793793
try:
794-
p.send_signal(sig)
794+
p.send_signal(signal.SIGKILL)
795795
except Exception:
796796
try:
797797
p.kill()

0 commit comments

Comments
 (0)