Function nc::getpgid

source ·
pub unsafe fn getpgid(pid: pid_t) -> Result<pid_t, Errno>
Expand description

Returns the PGID(process group ID) of the process specified by pid.

§Example

let ppid = unsafe { nc::getppid() };
let pgid = unsafe { nc::getpgid(ppid) };
assert!(pgid.is_ok());