setpgrp()
public
Equivalent to setpgid(0,0). Not
available on all platforms.
Show source
static VALUE
proc_setpgrp(void)
{
/* check for posix setpgid() first; this matches the posix */
/* getpgrp() above. It appears that configure will set SETPGRP_VOID */
/* even though setpgrp(0,0) would be preferred. The posix call avoids */
/* this confusion. */
if (setpgid(0,0) < 0) rb_sys_fail(0);
if (setpgrp() < 0) rb_sys_fail(0);
return INT2FIX(0);
}