W3cubDocs

/Crystal

class Process::Status

Overview

The status of a terminated process. Returned by Process#wait.

Defined in:

process/status.cr

Instance Method Summary

Instance Method Detail

def exit_code : Int32Source

If #normal_exit? is true, returns the exit code of the process.

def exit_signal : SignalSource

If #signal_exit? is true, returns the Signal the process received and didn't handle. Will raise if #signal_exit? is false.

Available only on Unix-like operating systems.

def exit_status : Int32Source

Platform-specific exit status code, which usually contains either the exit code or a termination signal. The other Process::Status methods extract the values from #exit_status.

def normal_exit? : BoolSource

Returns true if the process terminated normally.

def signal_exit? : BoolSource

Returns true if the process was terminated by a signal.

def success? : BoolSource

Returns true if the process exited normally with an exit code of 0.

© 2012–2020 Manas Technology Solutions.
Licensed under the Apache License, Version 2.0.
https://crystal-lang.org/api/0.35.1/Process/Status.html