Skip to content

Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →

class method

Process::UID.re_exchange

() -> ::Integer
Process::UID.re_exchange → integer

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

Example
[Process.uid, Process.euid]   #=> [0, 31]
Process::UID.re_exchange      #=> 0
[Process.uid, Process.euid]   #=> [31, 0]