MCPcopy Index your code
hub / github.com/apache/tvm / kill_child_processes

Function kill_child_processes

python/tvm/support/popen_pool.py:36–57  ·  view source on GitHub ↗

Kill all child processes recursively for a given pid. Parameters ---------- pid : int The given parameter id.

(pid)

Source from the content-addressed store, hash-verified

34
35
36def kill_child_processes(pid):
37 """Kill all child processes recursively for a given pid.
38
39 Parameters
40 ----------
41 pid : int
42 The given parameter id.
43 """
44 # pylint: disable=import-outside-toplevel
45 import psutil
46
47 try:
48 parent = psutil.Process(pid)
49 children = parent.children(recursive=True)
50 except psutil.NoSuchProcess:
51 return
52
53 for process in children:
54 try:
55 process.kill()
56 except psutil.NoSuchProcess:
57 pass
58
59
60class StatusKind(IntEnum):

Callers 1

killMethod · 0.85

Calls 1

killMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…