Function users::get_current_groupname
source · [−]Expand description
Returns the groupname of the user running the process.
libc functions used
Examples
use users::get_current_groupname;
match get_current_groupname() {
Some(gname) => println!("Running as group with name {:?}", gname),
None => println!("The current group does not exist!"),
}