getppid

Function getppid 

Source
pub fn getppid() -> pid_t
Expand description

Get the parent process ID see getppid(2)

Returns the process ID of the parent of the calling process. This function is always successful.

ยงExample

use fork::getppid;

let parent_pid = getppid();
println!("My parent's process ID: {}", parent_pid);