Method: Process::Status#exitstatus
- Defined in:
- process.c
#exitstatus ⇒ Integer?
Returns the least significant eight bits of the return code of the process if it has exited; nil
otherwise:
`exit 99`
$?.exitstatus # => 99
1083 1084 1085 1086 1087 1088 1089 1090 1091 |
# File 'process.c', line 1083 static VALUE pst_wexitstatus(VALUE st) { int status = PST2INT(st); if (WIFEXITED(status)) return INT2NUM(WEXITSTATUS(status)); return Qnil; } |