Results for: "to_proc"

Returns a Tms structure (see Process::Tms) that contains user and system CPU times for this process, and also for children processes.

t = Process.times
[ t.utime, t.stime, t.cutime, t.cstime ]   #=> [0.0, 0.02, 0.00, 0.00]

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.

No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available
No documentation available

schedule a command

start a job

No documentation available
No documentation available

terminate a job

kill a job

wait for all jobs to terminate

simple fork

No documentation available

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>"
Search took: 5ms  ·  Total Results: 1909