MCPcopy
hub / github.com/Yelp/dumb-init / pid_tree

Function pid_tree

testing/__init__.py:67–74  ·  view source on GitHub ↗

Return a list of all descendant PIDs for the given PID.

(pid)

Source from the content-addressed store, hash-verified

65
66
67def pid_tree(pid):
68 """Return a list of all descendant PIDs for the given PID."""
69 children = child_pids(pid)
70 return {
71 pid
72 for child in children
73 for pid in pid_tree(child)
74 } | children
75
76
77def is_alive(pid):

Callers 3

assert_living_pidsFunction · 0.90
spawn_and_kill_pipelineFunction · 0.90
print_signalsFunction · 0.85

Calls 1

child_pidsFunction · 0.85

Tested by 2

assert_living_pidsFunction · 0.72
spawn_and_kill_pipelineFunction · 0.72