collect_descendants

Function collect_descendants 

Source
pub fn collect_descendants(sys: &System, root: Pid, max_pids: usize) -> Vec<Pid>
Expand description

Returns the root PID plus all descendant PIDs via BFS, capped at max_pids.

Requires sys to have been refreshed with at least a minimal ProcessRefreshKind (so that Process::parent() is populated for all processes).