pub fn gid() -> u32
unix_process_user_group_ids
Returns the real group ID of the current process.
#![feature(unix_process_user_group_ids)] use std::os::unix::process; fn main() { let gid = process::gid(); println!("The current process has GID {}", gid); }