The reason why a process terminated.
This enum provides a platform-independent way to query any exceptions that occurred upon a process's termination, via Process::Status#exit_reason.
0 The process exited normally.
Process::Status#normal_exit? is true.0x40000000 are assumed to be reserved for normal exits.1 The process terminated due to an abort request.
Signal::ABRT, Signal::KILL, and Signal::QUIT.NTSTATUS value STATUS_FATAL_APP_EXIT.2 The process exited due to an interrupt request.
Signal::INT.3 The process reached a debugger breakpoint, but no debugger was attached.
Signal::TRAP.NTSTATUS value STATUS_BREAKPOINT.4 The process tried to access a memory address where a read or write was not allowed.
Signal::SEGV.NTSTATUS values STATUS_ACCESS_VIOLATION and STATUS_STACK_OVERFLOW.5 The process tried to access an invalid memory address.
Signal::BUS.NTSTATUS value STATUS_DATATYPE_MISALIGNMENT.6 The process tried to execute an invalid instruction.
Signal::ILL.NTSTATUS values STATUS_ILLEGAL_INSTRUCTION and STATUS_PRIVILEGED_INSTRUCTION.7 A hardware floating-point exception occurred.
Signal::FPE.NTSTATUS values STATUS_FLOAT_DIVIDE_BY_ZERO, STATUS_FLOAT_INEXACT_RESULT, STATUS_FLOAT_INVALID_OPERATION, STATUS_FLOAT_OVERFLOW, and STATUS_FLOAT_UNDERFLOW.8 The process exited due to a POSIX signal.
Only applies to signals without a more specific exit reason. Unused on Windows.
9 The process exited in a way that cannot be represented by any other ExitReasons.
A Process::Status that maps to Unknown may map to a different value if new enum members are added to ExitReason.
10 The process exited due to the user closing the terminal window or ending an ssh session.
Signal::HUP.CTRL_CLOSE_EVENT message.11 The process exited due to the user logging off or shutting down the OS.
Signal::TERM.CTRL_LOGOFF_EVENT and CTRL_SHUTDOWN_EVENT messages.Returns true if the process exited abnormally.
Returns true if this enum value equals Aborted
Returns true if this enum value equals AccessViolation
Returns true if this enum value equals BadInstruction
Returns true if this enum value equals BadMemoryAccess
Returns true if this enum value equals Breakpoint
Returns a textual description of this exit reason.
Returns true if this enum value equals FloatException
Returns true if this enum value equals Interrupted
Returns true if this enum value equals Normal
Returns true if this enum value equals SessionEnded
Returns true if this enum value equals Signal
Returns true if this enum value equals TerminalDisconnected
Returns true if this enum value equals Unknown
Enum
Enum
Enum
Enum
Comparable(Enum)
Value
Object
Object
Object
Returns true if the process exited abnormally.
This includes all values except Normal.
Returns true if this enum value equals AccessViolation
Returns true if this enum value equals BadInstruction
Returns true if this enum value equals BadMemoryAccess
Returns true if this enum value equals Breakpoint
Returns a textual description of this exit reason.
Process::ExitReason::Normal.description # => "Process exited normally" Process::ExitReason::Aborted.description # => "Process terminated abnormally"
Status#description provides more detail for a specific process status.
Returns true if this enum value equals FloatException
Returns true if this enum value equals Interrupted
Returns true if this enum value equals SessionEnded
Returns true if this enum value equals TerminalDisconnected
© 2012–2026 Manas Technology Solutions.
Licensed under the Apache License, Version 2.0.
https://crystal-lang.org/api/1.19.0/Process/ExitReason.html