Skip to main content

build_process_tree

Function build_process_tree 

Source
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.