Skip to content
instance method

Process::Status#exitstatus

() -> ::Integer?
exitstatus → integer or nil

Returns the least significant eight bits of the return code of the process if it has exited; nil otherwise:

Example
`exit 99`
$?.exitstatus # => 99
See also #exited? #inspect #coredump? #pid also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0