Function parent_id
1.27.0 · Source pub fn parent_id() -> u32
Available on Unix only.
Expand description
Returns the OS-assigned process identifier associated with this process’s parent.
§Example
use std::os::unix::process;
let parent = process::parent_id();
println!("The parent process has ID {}", parent);