An internal API for fork. Do not call this method directly. Currently, this is called via Kernel#fork
, Process.fork
, and IO.popen
with "-"
.
This method is not for casual code but for application monitoring libraries. You can add custom code before and after fork events by overriding this method.
Note: Process.daemon
may be implemented using fork(2) BUT does not go through this method. Thus, depending on your reason to hook into this method, you may also want to hook into that one. See this issue for a more detailed discussion of this.
Returns the scheduling priority for specified process, process group, or user.
Argument kind
is one of:
Process::PRIO_PROCESS
: return priority for process.
Process::PRIO_PGRP
: return priority for process group.
Process::PRIO_USER
: return priority for user.
Argument id
is the ID for the process, process group, or user; zero specified the current ID for kind
.
Examples:
Process.getpriority(Process::PRIO_USER, 0) # => 19 Process.getpriority(Process::PRIO_PROCESS, 0) # => 19
Not available on all platforms.
See Process.getpriority
.
Examples:
Process.setpriority(Process::PRIO_USER, 0, 19) # => 0 Process.setpriority(Process::PRIO_PROCESS, 0, 19) # => 0 Process.getpriority(Process::PRIO_USER, 0) # => 19 Process.getpriority(Process::PRIO_PROCESS, 0) # => 19
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.
Returns an array of the group IDs in the supplemental group access list for the current process:
Process.groups # => [4, 24, 27, 30, 46, 122, 135, 136, 1000]
These properties of the returned array are system-dependent:
Whether (and how) the array is sorted.
Whether the array includes effective group IDs.
Whether the array includes duplicate group IDs.
Whether the array size exceeds the value of Process.maxgroups
.
Use this call to get a sorted and unique array:
Process.groups.uniq.sort
Sets the supplemental group access list to the given array of group IDs.
Process.groups # => [0, 1, 2, 3, 4, 6, 10, 11, 20, 26, 27] Process.groups = [27, 6, 10, 11] # => [27, 6, 10, 11] Process.groups # => [27, 6, 10, 11]
Returns the maximum number of group IDs allowed in the supplemental group access list:
Process.maxgroups # => 32
Sets the maximum number of group IDs allowed in the supplemental group access list.
Returns a list of signal names mapped to the corresponding underlying signal numbers.
Signal.list #=> {"EXIT"=>0, "HUP"=>1, "INT"=>2, "QUIT"=>3, "ILL"=>4, "TRAP"=>5, "IOT"=>6, "ABRT"=>6, "FPE"=>8, "KILL"=>9, "BUS"=>7, "SEGV"=>11, "SYS"=>31, "PIPE"=>13, "ALRM"=>14, "TERM"=>15, "URG"=>23, "STOP"=>19, "TSTP"=>20, "CONT"=>18, "CHLD"=>17, "CLD"=>17, "TTIN"=>21, "TTOU"=>22, "IO"=>29, "XCPU"=>24, "XFSZ"=>25, "VTALRM"=>26, "PROF"=>27, "WINCH"=>28, "USR1"=>10, "USR2"=>12, "PWR"=>30, "POLL"=>29}
Returns the generator of the group.
See the OpenSSL
documentation for EC_GROUP_get0_generator()
Returns the cofactor of the group.
See the OpenSSL
documentation for EC_GROUP_get_cofactor()
Compile a ConstantReadNode
node
Compile a ImplicitRestNode
node
Compile a MatchRequiredNode
node
Compile a RestParameterNode
node
Desugar ‘x += y` to `x = x + y`
Dispatch enter and leave events for ConstantReadNode
nodes and continue walking the tree.
Dispatch enter and leave events for ImplicitRestNode
nodes and continue walking the tree.
Dispatch enter and leave events for MatchRequiredNode
nodes and continue walking the tree.
Dispatch enter and leave events for RegularExpressionNode
nodes and continue walking the tree.
Dispatch enter and leave events for RequiredParameterNode
nodes and continue walking the tree.
Dispatch enter and leave events for RestParameterNode
nodes and continue walking the tree.