module Process::Sys
The Process::Sys module contains UID and GID functions which provide direct bindings to the system calls of the same names instead of the more-portable versions of the same functionality found in the Process, Process::UID, and Process::GID modules.
Public Class Methods
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/core/process.rbs, line 2060
def self.geteuid: () -> Integer
Returns the effective user ID for the current process.
Process.euid # => 501
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/core/process.rbs, line 2072
def self.getgid: () -> Integer
Returns the (real) group ID for the current process:
Process.gid # => 1000
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/core/process.rbs, line 2084
def self.getuid: () -> Integer
Returns the (real) user ID of the current process.
Process.uid # => 1000
() → bool
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/core/process.rbs, line 2095
def self.issetugid: () -> bool
Returns true if the process was created as a result of an execve(2) system call which had either of the setuid or setgid bits set (and extra privileges were given as a result) or if it has changed any of its real, effective or saved user or group IDs since it began execution.
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/core/process.rbs, line 2104
def self.setegid: (Integer group) -> nil
Set the effective group ID of the calling process to group. Not available on all platforms.
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/core/process.rbs, line 2113
def self.seteuid: (Integer user) -> nil
Set the effective user ID of the calling process to user. Not available on all platforms.
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/core/process.rbs, line 2122
def self.setgid: (Integer group) -> nil
Set the group ID of the current process to group. Not available on all platforms.
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/core/process.rbs, line 2132
def self.setregid: (Integer rid, Integer eid) -> nil
Sets the (group) real and/or effective group IDs of the current process to rid and eid, respectively. A value of -1 for either means to leave that ID unchanged. Not available on all platforms.
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/core/process.rbs, line 2142
def self.setresgid: (Integer rid, Integer eid, Integer sid) -> nil
Sets the (group) real, effective, and saved user IDs of the current process to rid, eid, and sid respectively. A value of -1 for any value means to leave that ID unchanged. Not available on all platforms.
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/core/process.rbs, line 2152
def self.setresuid: (Integer rid, Integer eid, Integer sid) -> nil
Sets the (user) real, effective, and saved user IDs of the current process to rid, eid, and sid respectively. A value of -1 for any value means to leave that ID unchanged. Not available on all platforms.
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/core/process.rbs, line 2162
def self.setreuid: (Integer rid, Integer eid) -> nil
Sets the (user) real and/or effective user IDs of the current process to rid and eid, respectively. A value of -1 for either means to leave that ID unchanged. Not available on all platforms.
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/core/process.rbs, line 2171
def self.setrgid: (Integer group) -> nil
Set the real group ID of the calling process to group. Not available on all platforms.
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/core/process.rbs, line 2180
def self.setruid: (Integer user) -> nil
Set the real user ID of the calling process to user. Not available on all platforms.