Sets limits for the current process for the given resource to cur_limit (soft limit) and max_limit (hard limit); returns nil.
Argument resource specifies the resource whose limits are to be set; the argument may be given as a symbol, as a string, or as a constant beginning with Process::RLIMIT_ (e.g., :CORE, 'CORE', or Process::RLIMIT_CORE.
The resources available and supported are system-dependent, and may include (here expressed as symbols):
:AS: Total available memory (bytes) (SUSv3, NetBSD, FreeBSD, OpenBSD except 4.4BSD-Lite).
:CORE: Core size (bytes) (SUSv3).
:CPU: CPU time (seconds) (SUSv3).
:DATA: Data segment (bytes) (SUSv3).
:FSIZE: File size (bytes) (SUSv3).
:MEMLOCK: Total size for mlock(2) (bytes) (4.4BSD, GNU/Linux).
:MSGQUEUE: Allocation for POSIX message queues (bytes) (GNU/Linux).
:NICE: Ceiling on process’s nice(2) value (number) (GNU/Linux).
:NOFILE: File descriptors (number) (SUSv3).
:NPROC: Number of processes for the user (number) (4.4BSD, GNU/Linux).
:NPTS: Number of pseudo terminals (number) (FreeBSD).
:RSS: Resident memory size (bytes) (4.2BSD, GNU/Linux).
:RTPRIO: Ceiling on the process’s real-time priority (number) (GNU/Linux).
:RTTIME: CPU time for real-time process (us) (GNU/Linux).
:SBSIZE: All socket buffers (bytes) (NetBSD, FreeBSD).
:SIGPENDING: Number of queued signals allowed (signals) (GNU/Linux).
:STACK: Stack size (bytes) (SUSv3).
Arguments cur_limit and max_limit may be:
Integers (max_limit should not be smaller than cur_limit).
Symbol :SAVED_MAX, string 'SAVED_MAX', or constant Process::RLIM_SAVED_MAX: saved maximum limit.
Symbol :SAVED_CUR, string 'SAVED_CUR', or constant Process::RLIM_SAVED_CUR: saved current limit.
Symbol :INFINITY, string 'INFINITY', or constant Process::RLIM_INFINITY: no limit on resource.
This example raises the soft limit of core size to the hard limit to try to make core dump possible:
Process.setrlimit(:CORE, Process.getrlimit(:CORE)[1])
Not available on all platforms.
Sets the supplemental group access list; the new list includes:
The group IDs of those groups to which the user given by username belongs.
The group ID gid.
Example:
Process.groups # => [0, 1, 2, 3, 4, 6, 10, 11, 20, 26, 27] Process.initgroups('me', 30) # => [30, 6, 10, 11] Process.groups # => [30, 6, 10, 11]
Not available on all platforms.
Detaches the current process from its controlling terminal and runs it in the background as system daemon; returns zero.
By default:
Changes the current working directory to the root directory.
Redirects $stdin, $stdout, and $stderr to the null device.
If optional argument nochdir is true, does not change the current working directory.
If optional argument noclose is true, does not redirect $stdin, $stdout, or $stderr.
Returns the name of the script being executed. The value is not affected by assigning a new value to $0.
This method first appeared in Ruby 2.1 to serve as a global variable free means to get the script name.
This integer returns the current initial length of the buffer.
This sets the initial length of the buffer to length, if length > 0, otherwise its value isn’t changed.
Returns the form how EC::Point data is encoded as ASN.1.
See also point_conversion_form=.
Sets the form how EC::Point data is encoded as ASN.1 as defined in X9.62.
format can be one of these:
:compressedEncoded as z||x, where z is an octet indicating which solution of the equation y is. z will be 0x02 or 0x03.
:uncompressedEncoded as z||x||y, where z is an octet 0x04.
:hybridEncodes as z||x||y, where z is an octet indicating which solution of the equation y is. z will be 0x06 or 0x07.
See the OpenSSL documentation for EC_GROUP_set_point_conversion_form()
until foo; bar end ^^^^^^^^^^^^^^^^^^
bar until foo ^^^^^^^^^^^^^
Returns the set of targets for a MultiTargetNode or a MultiWriteNode.
def foo((bar, baz)); end
^^^^^^^^^^
until foo; bar end ^^^^^^^^^^^^^^^^^
bar until foo ^^^^^^^^^^^^^
Pattern constants get wrapped in another layer of :const.
Get the issuing certificate’s key identifier from the authorityKeyIdentifier extension, as described in RFC5280 Section 4.2.1.1
Returns the binary String keyIdentifier or nil or raises ASN1::ASN1Error.
@@foo = 1 ^^^^^^^^^
@@foo, @@bar = 1 ^^^^^ ^^^^^
@@foo, = bar ^^^^^
Foo += bar ^^^^^^^^^^^
Foo &&= bar ^^^^^^^^^^^^