MCPcopy Create free account
hub / github.com/FastLED/FastLED / get_process_tree

Function get_process_tree

ci/debug/port_diagnostic.py:34–44  ·  view source on GitHub ↗

Get the process tree (parents) for a process.

(proc: psutil.Process)

Source from the content-addressed store, hash-verified

32
33
34def get_process_tree(proc: psutil.Process) -> list[psutil.Process]:
35 """Get the process tree (parents) for a process."""
36 tree: list[psutil.Process] = []
37 current = proc
38 try:
39 while current:
40 tree.append(current)
41 current = current.parent()
42 except (psutil.NoSuchProcess, psutil.AccessDenied):
43 pass
44 return tree
45
46
47def check_matches_kill_patterns(

Callers 1

diagnose_portFunction · 0.85

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected