Skip to content

End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

class method

Process::GID.grant_privilege

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.

Example
[Process.gid, Process.egid]          #=> [0, 0]
Process::GID.grant_privilege(31)     #=> 33
[Process.gid, Process.egid]          #=> [0, 33]
See also .from_name .re_exchange .eid .re_exchangeable? also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1