gid=(p1)
  public
  
    
    
Sets the group ID for this process.
   
  
    Show source    
    
      /*
 *  call-seq:
 *     Process.gid= fixnum   => fixnum
 *
 *  Sets the group ID for this process.
 */
static VALUE
proc_setgid(obj, id)
    VALUE obj, id;
{
    int gid = NUM2INT(id);
    check_gid_switch();
    if (setresgid(gid, -1, -1) < 0) rb_sys_fail(0);
    if (setregid(gid, -1) < 0) rb_sys_fail(0);
    if (setrgid(gid) < 0) rb_sys_fail(0);
    {
        if (getegid() == gid) {
            if (setgid(gid) < 0) rb_sys_fail(0);
        }
        else {
            rb_notimplement();
        }
    }
    rb_notimplement();
    return INT2FIX(gid);
}