Skip to content

Commit

Permalink
Protect child process enumeration in AutoTVM (apache#7887)
Browse files Browse the repository at this point in the history
  • Loading branch information
PENGUINLIONG authored and Trevor Morris committed May 6, 2021
1 parent 33bbae9 commit de20d24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/tvm/autotvm/measure/local_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ def kill_child_processes(parent_pid, sig=signal.SIGTERM):
"""kill all child processes recursively"""
try:
parent = psutil.Process(parent_pid)
children = parent.children(recursive=True)
except psutil.NoSuchProcess:
return
children = parent.children(recursive=True)
for process in children:
try:
process.send_signal(sig)
Expand Down

0 comments on commit de20d24

Please sign in to comment.