src/ruby_supportlib/phusion_passenger/vendor/daemon_controller.rb
def interruptable_waitpid(pid)
      result = nil
      while !result
        result = Process.waitpid(pid, Process::WNOHANG)
        sleep 0.01 if !result
      end
      result
    end
# On Ruby 1.9, Thread#kill (which is called by timeout.rb) may
# not be able to interrupt Process.waitpid. So here we use a
# special version that's a bit less efficient but is at least
# interruptable.
On Ruby 1.9, Thread#kill (which is called by timeout.rb) may
not be able to interrupt Process.waitpid. So here we use a
special version that's a bit less efficient but is at least
interruptable.
On Ruby 1 . 9 Thread#kill ( which is called by timeout . rb ) may not be able to interrupt Process . waitpid . So here we use a special version that ' s a bit less efficient but is at least interruptable .
def interruptable_waitpid(pid)
      result = nil
      while !result
        result = Process.waitpid(pid, Process::WNOHANG)
        sleep 0.01 if !result
      end
      result
    end
def interruptable_waitpid ( pid ) result = nil while ! result result = Process . waitpid ( pid , Process :: WNOHANG ) sleep 0.01 if ! result end result end
On Ruby 1.9, Thread#kill (which is called by timeout.rb) may
not be able to interrupt Process.waitpid.
On Ruby 1 . 9 Thread#kill ( which is called by timeout . rb ) may not be able to interrupt Process . waitpid .
pid