W3cubDocs

/Crystal 0.31

class Process::Status

Overview

The status of a terminated process.

Defined in:

process/status.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(exit_status : Int32)Source

Instance Method Detail

def exit_codeSource

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

def exit_signalSource

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

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?Source

Returns true if the process terminated normally.

def signal_exit?Source

Returns true if the process was terminated by a signal.

def success?Source

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

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