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.change_privilege

Process::GID.change_privilege(group) → integer

Change the current process’s real and effective group ID to that specified by group. Returns the new group ID. Not available on all platforms.

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