/* * call-seq: * Process.getpgid(pid) => integer * * Returns the process group ID for the given process id. Not * available on all platforms. * * Process.getpgid(Process.ppid()) #=> 25527 */ static VALUE proc_getpgid(obj, pid) VALUE obj, pid; { #if defined(HAVE_GETPGID) && !defined(__CHECKER__) int i; rb_secure(2); i = getpgid(NUM2INT(pid)); if (i < 0) rb_sys_fail(0); return INT2NUM(i); #else rb_notimplement(); #endif }