Module PhusionPassenger::AdminTools |
In: | lib/phusion_passenger/admin_tools.rb lib/phusion_passenger/admin_tools/control_process.rb

Methods

- process_is_alive?
- tmpdir

Classes and Modules
Class PhusionPassenger::AdminTools::ControlProcess
Public Class methods
process_is_alive?(pid)

[ show source ]

        # File lib/phusion_passenger/admin_tools.rb, line 13
    13:         def self.process_is_alive?(pid)
    14:                 begin
    15:                         Process.kill(0, pid)
    16:                         return true
    17:                 rescue Errno::ESRCH
    18:                         return false
    19:                 rescue SystemCallError => e
    20:                         return true
    21:                 end
    22:         end

tmpdir()

[ show source ]

        # File lib/phusion_passenger/admin_tools.rb, line 4
     4:         def self.tmpdir
     5:                 ["PASSENGER_TEMP_DIR", "PASSENGER_TMPDIR"].each do |name|
     6:                         if ENV.has_key?(name) && !ENV[name].empty?
     7:                                 return ENV[name]
     8:                         end
     9:                 end
    10:                 return "/tmp"
    11:         end