Method: Process.last_status
- Defined in:
- process.c
.last_status ⇒ Process::Status?
Returns the status of the last executed child process in the current thread.
Process.wait Process.spawn("ruby", "-e", "exit 13")
Process.last_status #=> #<Process::Status: pid 4825 exit 13>
If no child process has ever been executed in the current thread, this returns nil.
Process.last_status #=> nil
616 617 618 619 620 |
# File 'process.c', line 616
static VALUE
proc_s_last_status(VALUE mod)
{
return rb_last_status_get();
}
|