End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
Process::GID.from_name
Process::GID.from_name(name) → gid
process.c
View on GitHub ↗
static VALUE
p_gid_from_name(VALUE self, VALUE id)
{
return GIDT2NUM(OBJ2GID(id));
}
Get the group ID by the name. If the group is not found, ArgumentError will be raised.
Example
Process::GID.from_name("wheel") #=> 0 Process::GID.from_name("nosuchgroup") #=> can't find group for nosuchgroup (ArgumentError)
See also
.eid
.grant_privilege
.change_privilege
.re_exchange
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1