/// Set real, effective and saved group Ids of the calling process.
///
/// # Examples
///
/// ```
/// let ret = unsafe { nc::setresgid(0, 0, 0) };
/// assert_eq!(ret, Err(nc::EPERM));
/// ```
pub unsafe fn setresgid(rgid: gid_t, egid: gid_t, sgid: gid_t) -> Result<(), Errno> {
let rgid = rgid as usize;
let egid = egid as usize;
let sgid = sgid as usize;
syscall3(SYS_SETRESGID, rgid, egid, sgid).map(drop)
}