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 1041
    1041:         def self.timed_waitpid(pid, max_time)
    1042:                 done = false
    1043:                 start_time = Time.now
    1044:                 while Time.now - start_time < max_time && !done
    1045:                         done = Process.waitpid(pid, Process::WNOHANG)
    1046:                         sleep 0.1 if !done
    1047:                 end
    1048:                 return !!done
    1049:         rescue Errno::ECHILD
    1050:                 return true
    1051:         end

[Validate]