method

exitstatus

v1_8_6_287 - Show latest stable - Class: Process::Status
exitstatus()
public

Returns the least significant eight bits of the return code of stat. Only available if exited? is true.

   fork { }           #=> 26572
   Process.wait       #=> 26572
   $?.exited?         #=> true
   $?.exitstatus      #=> 0

   fork { exit 99 }   #=> 26573
   Process.wait       #=> 26573
   $?.exited?         #=> true
   $?.exitstatus      #=> 99