pub fn setpgid(pid: pid_t, pgid: pid_t) -> Result<(), Errno>
Set the process group ID (PGID) of the process specified by pid to pgid.
pid
pgid
let ret = nc::setpgid(nc::getpid(), 1); assert!(ret.is_err()); assert_eq!(ret, Err(nc::EPERM));