class Selenium::WebDriver::ChildProcess

def exited?

def exited?
  return false unless @pid
  WebDriver.logger.debug("Checking if #{@pid} is exited:", id: :process)
  _, @status = waitpid2(@pid, Process::WNOHANG | Process::WUNTRACED) if @status.nil?
  return false if @status.nil?
  exit_code = @status.exitstatus || @status.termsig
  WebDriver.logger.debug("  -> exit code is #{exit_code.inspect}", id: :process)
  !!exit_code
rescue Errno::ECHILD, Errno::ESRCH
  WebDriver.logger.debug("  -> process: #{@pid} already finished", id: :process)
  true
end