Skip to main content

effective_gid

Function effective_gid 

Source
pub fn effective_gid() -> u32
🔬This is a nightly-only experimental API. (unix_process_user_group_ids #166252)
Available on Unix only.
Expand description

Returns the effective group ID of the current process.

§Example

#![feature(unix_process_user_group_ids)]
use std::os::unix::process;

fn main() {
    let egid = process::effective_gid();
    println!("The current process has effective GID {}", egid);
}