pub fn resolve(store: &impl ProcessStore, pid: u32) -> Option<ProcessInfo>Expand description
Resolve a PID to its process info.
Checks the store first, then falls back to reading /proc directly.
use proc_tree::{DefaultStore, snapshot, resolve, ProcessStore};
let store = DefaultStore::new(600);
snapshot(&store).expect("failed to read /proc");
let info = resolve(&store, 1).unwrap();
assert!(!info.cmd().is_empty());