egid=(p1)
public
Sets the effective group ID for this process. Not available on all
platforms.
Show source
/*
* call-seq:
* Process.egid = fixnum => fixnum
*
* Sets the effective group ID for this process. Not available on all
* platforms.
*/
static VALUE
proc_setegid(obj, egid)
VALUE obj, egid;
{
check_gid_switch();
if (setresgid(-1, NUM2INT(egid), -1) < 0) rb_sys_fail(0);
if (setregid(-1, NUM2INT(egid)) < 0) rb_sys_fail(0);
if (setegid(NUM2INT(egid)) < 0) rb_sys_fail(0);
egid = NUM2INT(egid);
if (egid == getgid()) {
if (setgid(egid) < 0) rb_sys_fail(0);
}
else {
rb_notimplement();
}
rb_notimplement();
return egid;
}