Skip to content

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

class method

Process.getrlimit

(::interned | ::Integer resource) -> [ ::Integer, ::Integer ]
Process.getrlimit(resource) → [cur_limit, max_limit]

Returns a 2-element array of the current (soft) limit and maximum (hard) limit for the given resource.

Argument resource specifies the resource whose limits are to be returned; see Process.setrlimit.

Each of the returned values cur_limit and max_limit is an integer; see Process.setrlimit.

Example:

Example
Process.getrlimit(:CORE) # => [0, 18446744073709551615]

See Process.setrlimit.

Not available on all platforms.

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