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

Process.getrlimit(resource) → [cur_limit, max_limit]

Gets the resource limit of the process. cur_limit means current (soft) limit and max_limit means maximum (hard) limit.

resource indicates the kind of resource to limit. It is specified as a symbol such as :CORE, a string such as "CORE" or a constant such as Process::RLIMIT_CORE. See Process.setrlimit for details.

cur_limit and max_limit may be Process::RLIM_INFINITY, Process::RLIM_SAVED_MAX or Process::RLIM_SAVED_CUR. See Process.setrlimit and the system getrlimit(2) manual for details.

See also .getpriority .getsid .getpgrp .gid also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1