Module: Process
- Defined in:
- lib/phusion_passenger/utils.rb
Class Method Summary collapse
Class Method Details
.timed_waitpid(pid, max_time) ⇒ Object
1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 |
# File 'lib/phusion_passenger/utils.rb', line 1038 def self.timed_waitpid(pid, max_time) done = false start_time = Time.now while Time.now - start_time < max_time && !done done = Process.waitpid(pid, Process::WNOHANG) sleep 0.1 if !done end return !!done rescue Errno::ECHILD return true end |