getpgrp()
public
Show source
/*
* call-seq:
* Process.getpgrp => integer
*
* Returns the process group ID for this process. Not available on
* all platforms.
*
* Process.getpgid(0) #=> 25527
* Process.getpgrp #=> 25527
*/
static VALUE
proc_getpgrp()
{
int pgrp;
rb_secure(2);
pgrp = getpgrp();
if (pgrp < 0) rb_sys_fail(0);
return INT2FIX(pgrp);
pgrp = getpgid(0);
if (pgrp < 0) rb_sys_fail(0);
return INT2FIX(pgrp);
rb_notimplement();
}