Function nc::setpgid

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

Set the process group ID (PGID) of the process specified by pid to pgid.

§Example

let ret = unsafe { nc::setpgid(nc::getpid(), 1) };
assert!(ret.is_err());
assert_eq!(ret, Err(nc::EPERM));