Skip to content
class method

Process::UID.change_privilege

(::Integer user) -> ::Integer
Process::UID.change_privilege(user) → integer

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

Example
[Process.uid, Process.euid]          #=> [0, 0]
Process::UID.change_privilege(31)    #=> 31
[Process.uid, Process.euid]          #=> [31, 31]
See also .eid .from_name also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0