staticVALUEproc_setuid(VALUEobj,VALUEid){rb_uid_tuid;check_uid_switch();uid=OBJ2UID(id);#if defined(HAVE_SETRESUID)if(setresuid(uid,-1,-1)<0)rb_sys_fail(0);#elif defined HAVE_SETREUIDif(setreuid(uid,-1)<0)rb_sys_fail(0);#elif defined HAVE_SETRUIDif(setruid(uid)<0)rb_sys_fail(0);#elif defined HAVE_SETUID{if(geteuid()==uid){if(setuid(uid)<0)rb_sys_fail(0);}else{rb_notimplement();}}#endifreturnid;}