class Process::Status

Process::Status 包含有关系统进程的信息。

线程局部变量 $? 的初始值为 nil。某些方法会为其赋值一个 Process::Status 对象,该对象表示一个系统进程(正在运行或已终止)

`ruby -e "exit 99"`
stat = $?       # => #<Process::Status: pid 1262862 exit 99>
stat.class      # => Process::Status
stat.to_i       # => 25344
stat.stopped?   # => false
stat.exited?    # => true
stat.exitstatus # => 99