Return a list of all descendant PIDs for the given PID.
(pid)
| 65 | |
| 66 | |
| 67 | def 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 | |
| 77 | def is_alive(pid): |