method
last_status
v2_5_5 -
Show latest stable
- Class:
Process
last_status()public
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