Skip to content

End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

class method

PTY.check

PTY.check(pid, raise = false) => Process::Status or nil
PTY.check(pid, true) => nil or raises PTY::ChildExited

Checks the status of the child process specified by pid. Returns nil if the process is still alive.

If the process is not alive, and raise was true, a PTY::ChildExited exception will be raised. Otherwise it will return a Process::Status instance.

pid

The process id of the process to check

raise

If true and the process identified by pid is no longer alive a PTY::ChildExited is raised.

See also .getpty .open also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1