pub fn id() -> u32
unstable
Returns the OS-assigned process identifier associated with this process.
Basic usage:
use std::process; println!("My pid is {}", process::id());