Skip to content
On this page
class · Ruby 4.0

Process::Status

< Object 13 instance methods 1 class methods

A Process::Status contains information about a system process.

Thread-local variable $? is initially nil. Some methods assign to it a Process::Status object that represents a system process (either running or terminated):

Example
`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

Class methods 1

Instance methods 13

Ruby version changes 1

  1. 3.3