class method
Process::Sys.setregid
(::Integer rid, ::Integer eid) -> nil
Process::Sys.setregid(rid, eid) → nil
process.c
View on GitHub ↗
static VALUE
p_sys_setregid(VALUE obj, VALUE rid, VALUE eid)
{
rb_gid_t rgid, egid;
check_gid_switch();
rgid = OBJ2GID(rid);
egid = OBJ2GID(eid);
if (setregid(rgid, egid) != 0) rb_sys_fail(0);
return Qnil;
}
Sets the (group) real and/or effective group IDs of the current process to rid and eid, respectively. A value of -1 for either means to leave that ID unchanged. Not available on all platforms.