Module | Process
In: | lib/phusion_passenger/utils.rb

### Methods

timed_waitpid

### Public Class methods

timed_waitpid(pid, max_time)

[Source]

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

[Validate]