pub fn read_proc_status_fields(pid: u32) -> Option<(String, u32, u32)>Expand description
Read user, ppid, tgid from /proc/{pid}/status in one pass.
Returns None if the process doesn’t exist or parsing fails.
use proc_tree::proc::read_proc_status_fields;
let (user, ppid, tgid) = read_proc_status_fields(1).unwrap();
assert_eq!(user, "root");
assert_eq!(ppid, 0); // PID 1 has no parent