devela::_dep::nc

Function setpgid

pub unsafe fn setpgid(pid: i32, pgid: i32) -> Result<(), i32> 
Available on crate feature dep_nc only.
Expand description

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

§Examples

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