Method: Process::GID.grant_privilege

Defined in:
process.c

.Process::GID.grant_privilege(group) ⇒ Integer .Process::GID.eid( = group) ⇒ Integer

Set the effective group ID, and if possible, the saved group ID of the process to the given group. Returns the new effective group ID. Not available on all platforms.

[Process.gid, Process.egid]          #=> [0, 0]
Process::GID.grant_privilege(31)     #=> 33
[Process.gid, Process.egid]          #=> [0, 33]

Overloads:



7551
7552
7553
7554
7555
7556
# File 'process.c', line 7551

static VALUE
p_gid_grant_privilege(VALUE obj, VALUE id)
{
    rb_setegid_core(OBJ2GID(id));
    return id;
}