pub fn build_process_tree(procs: &[ProcessInfo]) -> Vec<TreeNode>Expand description
Build a process tree from a flat list.
Processes whose parent_pid matches another process’s pid become children
of that parent. Processes with no parent in the list (orphans), parent_pid
of None, or parent_pid of Some(0) become root nodes at depth 0.