setpgid(p1, p2)
public
Sets the process group ID of pid (0 indicates this process) to
integer. Not available on all platforms.
Show source
/*
* call-seq:
* Process.setpgid(pid, integer) => 0
*
* Sets the process group ID of _pid_ (0 indicates this
* process) to <em>integer</em>. Not available on all platforms.
*/
static VALUE
proc_setpgid(obj, pid, pgrp)
VALUE obj, pid, pgrp;
{
#ifdef HAVE_SETPGID
int ipid, ipgrp;
rb_secure(2);
ipid = NUM2INT(pid);
ipgrp = NUM2INT(pgrp);
if (setpgid(ipid, ipgrp) < 0) rb_sys_fail(0);
return INT2FIX(0);
#else
rb_notimplement();
#endif
}