Function nc::getpid

source ·
pub unsafe fn getpid() -> pid_t
Expand description

Get the process ID (PID) of the calling process.

§Example

let pid = unsafe { nc::getpid() };
assert!(pid > 0);