End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
Process::Sys.setreuid
Process::Sys.setreuid(rid, eid) → nil
process.c
View on GitHub ↗
static VALUE
p_sys_setreuid(VALUE obj, VALUE rid, VALUE eid)
{
rb_uid_t ruid, euid;
PREPARE_GETPWNAM;
check_uid_switch();
ruid = OBJ2UID1(rid);
euid = OBJ2UID1(eid);
FINISH_GETPWNAM;
if (setreuid(ruid, euid) != 0) rb_sys_fail(0);
return Qnil;
}
Sets the (user) real and/or effective user 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.