Function getgroups
pub unsafe fn getgroups(group_list: &mut [u32]) -> Result<i32, i32> ⓘ
Available on crate feature
dep_nc
only.Expand description
Get list of supplementary group Ids.
§Examples
let mut groups = vec![];
let ret = unsafe { nc::getgroups(&mut groups) };
assert!(ret.is_ok());
let total_num = ret.unwrap();
groups.resize(total_num as usize, 0);
let ret = unsafe { nc::getgroups(&mut groups) };
assert!(ret.is_ok());
assert_eq!(ret, Ok(total_num));