Results for: "to_proc"

No documentation available
No documentation available

terminate a job

kill a job

wait for all jobs to terminate

simple fork

Returns true if the integer value of stat equals other.

Logical AND of the bits in stat with num.

fork { exit 0x37 }
Process.wait
sprintf('%04x', $?.to_i)       #=> "3700"
sprintf('%04x', $? & 0x1e00)   #=> "1600"

Shift the bits in stat right num places.

fork { exit 99 }   #=> 26563
Process.wait       #=> 26563
$?.to_i            #=> 25344
$? >> 8            #=> 99

Override the inspection method.

system("false")
p $?.inspect #=> "#<Process::Status: pid 12861 exit 1>"

Returns the process ID that this status object represents.

fork { exit }   #=> 26569
Process.wait    #=> 26569
$?.pid          #=> 26569

Returns true if stat terminated because of an uncaught signal.

Returns the number of the signal that caused stat to terminate (or nil if self was not terminated by an uncaught signal).

Returns true if stat exited normally (for example using an exit() call or finishing the program).

Returns the least significant eight bits of the return code of stat. Only available if exited? is true.

fork { }           #=> 26572
Process.wait       #=> 26572
$?.exited?         #=> true
$?.exitstatus      #=> 0

fork { exit 99 }   #=> 26573
Process.wait       #=> 26573
$?.exited?         #=> true
$?.exitstatus      #=> 99

Returns true if stat is successful, false if not. Returns nil if exited? is not true.

Returns true if stat generated a coredump when it terminated. Not available on all platforms.

Returns the (real) user ID of this process.

Process.uid   #=> 501

Returns the effective user ID for this process.

Process.euid   #=> 501

Exchange real and effective user IDs and return the new effective user ID. Not available on all platforms.

[Process.uid, Process.euid]   #=> [0, 31]
Process::UID.re_exchange      #=> 0
[Process.uid, Process.euid]   #=> [31, 0]

Returns true if the real and effective user IDs of a process may be exchanged on the current platform.

Returns true if the current platform has saved user ID functionality.

Switch the effective and real user IDs of the current process. If a block is given, the user IDs will be switched back after the block is executed. Returns the new effective user ID if called without a block, and the return value of the block if one is given.

Returns the (real) group ID for this process.

Process.gid   #=> 500

Returns the effective group ID for this process. Not available on all platforms.

Process.egid   #=> 500
Search took: 4ms  ·  Total Results: 1969