method

last_status

Importance_1
Ruby latest stable (v2_5_5) - 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.