Skip to content

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

class method

Process::GID.re_exchange

Process::GID.re_exchange → integer

Exchange real and effective group IDs and return the new effective group ID. Not available on all platforms.

Example
[Process.gid, Process.egid]   #=> [0, 33]
Process::GID.re_exchange      #=> 0
[Process.gid, Process.egid]   #=> [33, 0]