[−][src]Function users::switch::set_current_gid
pub fn set_current_gid(gid: gid_t) -> IOResult<()>
Sets the current group for the running process to the one with the given group ID.
Typically, trying to switch to any group other than the group already running the process requires root privileges.
libc functions used
Examples
use users::switch::set_current_gid; set_current_gid(1001); // current group ID is 1001