method

last_status

Importance_1
v2_5_5 - Show latest stable - 0 notes - 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
Show source
Register or log in to add new notes.