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.
Sets the resource limit of the process. cur_limit means current (soft) limit and max_limit means maximum (hard) limit.
If max_limit is not given, cur_limit is used.
resource indicates the kind of resource to limit. It should be a symbol such as :CORE
, a string such as "CORE"
or a constant such as Process::RLIMIT_CORE
. The available resources are OS dependent. Ruby may support following resources.
total available memory (bytes) (SUSv3, NetBSD, FreeBSD, OpenBSD but 4.4BSD-Lite)
core size (bytes) (SUSv3)
CPU time (seconds) (SUSv3)
data segment (bytes) (SUSv3)
file size (bytes) (SUSv3)
total size for mlock(2) (bytes) (4.4BSD, GNU/Linux)
allocation for POSIX message queues (bytes) (GNU/Linux)
ceiling on process’s nice(2) value (number) (GNU/Linux)
file descriptors (number) (SUSv3)
number of processes for the user (number) (4.4BSD, GNU/Linux)
RSS
resident memory size (bytes) (4.2BSD, GNU/Linux)
ceiling on the process’s real-time priority (number) (GNU/Linux)
CPU time for real-time process (us) (GNU/Linux)
all socket buffers (bytes) (NetBSD, FreeBSD)
number of queued signals allowed (signals) (GNU/Linux)
stack size (bytes) (SUSv3)
cur_limit and max_limit may be :INFINITY
, "INFINITY"
or Process::RLIM_INFINITY
, which means that the resource is not limited. They may be Process::RLIM_SAVED_MAX
, Process::RLIM_SAVED_CUR
and corresponding symbols and strings too. See system setrlimit(2) manual for details.
The following 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])
Initializes the supplemental group access list by reading the system group database and using all groups of which the given user is a member. The group with the specified gid is also added to the list. Returns the resulting Array
of the gids of all the groups in the supplementary group access list. Not available on all platforms.
Process.groups #=> [0, 1, 2, 3, 4, 6, 10, 11, 20, 26, 27] Process.initgroups( "mgranger", 30 ) #=> [30, 6, 10, 11] Process.groups #=> [30, 6, 10, 11]
Return the best specification that contains the file matching path
amongst the specs that are not activated.
Search through all unresolved deps and sub-dependencies and return specs that contain the file matching path
.
Allocates a C struct with the types
provided.
When the instance is garbage collected, the C function func
is called.
Allocates a C union the types
provided.
When the instance is garbage collected, the C function func
is called.
Fiddle::Pointer.malloc(size, freefunc = nil) => fiddle pointer instance
Allocate size
bytes of memory and associate it with an optional freefunc
that will be called when the pointer is garbage collected.
freefunc
must be an address pointing to a function or an instance of Fiddle::Function
Returns a string formatted with an easily readable representation of the internal state of the pointer.
Returns the remaining data held in the cipher object. Further calls to Cipher#update
or Cipher#final
will return garbage. This call should always be made as the last call of an encryption or decryption operation, after after having fed the entire plaintext or ciphertext to the Cipher
instance.
If an authenticated cipher was used, a CipherError
is raised if the tag could not be authenticated successfully. Only call this method after setting the authentication tag and passing the entire contents of the ciphertext into the cipher.
Enables or disables padding. By default encryption operations are padded using standard block padding and the padding is checked and removed when decrypting. If the pad parameter is zero then no padding is performed, the total amount of data encrypted or decrypted must then be a multiple of the block size or an error will occur.
See EVP_CIPHER_CTX_set_padding for further information.
String representation of this configuration object, including the class name and its sections.
Returns an array of currently loaded engines.