exitstatus

stat.exitstatus รข fixnum or nil
Instance Public methods

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
doc_ruby_on_rails
2015-04-28 17:41:03
Comments
Leave a Comment

Please login to continue.