--- !ruby/object:RI::MethodDescription
aliases: []
block_params:
comment:
- !ruby/struct:SM::Flow::P
body: Sets the resource limit of the process. cur_limit means current (soft) limit and max_limit means maximum (hard) limit.
- !ruby/struct:SM::Flow::P
body: If max_limit is not given, cur_limit is used.
- !ruby/struct:SM::Flow::P
body: resource indicates the kind of resource to limit. The list of resources are OS dependent. Ruby may support following resources.
- !ruby/object:SM::Flow::LIST
contents:
- !ruby/struct:SM::Flow::LI
label: Process::RLIMIT_CORE
body: core size (bytes) (SUSv3)
- !ruby/struct:SM::Flow::LI
label: Process::RLIMIT_CPU
body: CPU time (seconds) (SUSv3)
- !ruby/struct:SM::Flow::LI
label: Process::RLIMIT_DATA
body: data segment (bytes) (SUSv3)
- !ruby/struct:SM::Flow::LI
label: Process::RLIMIT_FSIZE
body: file size (bytes) (SUSv3)
- !ruby/struct:SM::Flow::LI
label: Process::RLIMIT_NOFILE
body: file descriptors (number) (SUSv3)
- !ruby/struct:SM::Flow::LI
label: Process::RLIMIT_STACK
body: stack size (bytes) (SUSv3)
- !ruby/struct:SM::Flow::LI
label: Process::RLIMIT_AS
body: total available memory (bytes) (SUSv3, NetBSD, FreeBSD, OpenBSD but 4.4BSD-Lite)
- !ruby/struct:SM::Flow::LI
label: Process::RLIMIT_MEMLOCK
body: total size for mlock(2) (bytes) (4.4BSD, GNU/Linux)
- !ruby/struct:SM::Flow::LI
label: Process::RLIMIT_NPROC
body: number of processes for the user (number) (4.4BSD, GNU/Linux)
- !ruby/struct:SM::Flow::LI
label: Process::RLIMIT_RSS
body: resident memory size (bytes) (4.2BSD, GNU/Linux)
- !ruby/struct:SM::Flow::LI
label: Process::RLIMIT_SBSIZE
body: all socket buffers (bytes) (NetBSD, FreeBSD)
type: :LABELED
- !ruby/struct:SM::Flow::P
body: Other Process::RLIMIT_??? constants may be defined.
- !ruby/struct:SM::Flow::P
body: cur_limit and max_limit may be Process::RLIM_INFINITY, which means that the resource is not limited. They may be Process::RLIM_SAVED_MAX or Process::RLIM_SAVED_CUR too. See system setrlimit(2) manual for details.
full_name: Process::setrlimit
is_singleton: true
name: setrlimit
params: |
Process.setrlimit(resource, cur_limit, max_limit) => nil
Process.setrlimit(resource, cur_limit) => nil
visibility: public