Skip to content
class method

PTY.check

(::Integer pid, ?::boolish raise) -> ::Process::Status?
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 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0