Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
class method
Process.getpgid
Process.getpgid(pid) → integer
process.c
View on GitHub ↗
static VALUE
proc_getpgid(VALUE obj, VALUE pid)
{
rb_pid_t i;
i = getpgid(NUM2PIDT(pid));
if (i < 0) rb_sys_fail(0);
return PIDT2NUM(i);
}
Returns the process group ID for the given process ID +pid+: Process.getpgid(Process.ppid) # => 25527
Not available on all platforms.