Module: PhusionPassenger::AdminTools
- Defined in:
- lib/phusion_passenger/admin_tools.rb,
lib/phusion_passenger/admin_tools/control_process.rb
Defined Under Namespace
Classes: ControlProcess
Class Method Summary collapse
Class Method Details
.process_is_alive?(pid) ⇒ Boolean
36 37 38 39 40 41 42 43 44 45 |
# File 'lib/phusion_passenger/admin_tools.rb', line 36 def self.process_is_alive?(pid) begin Process.kill(0, pid) return true rescue Errno::ESRCH return false rescue SystemCallError => e return true end end |
.tmpdir ⇒ Object
27 28 29 30 31 32 33 34 |
# File 'lib/phusion_passenger/admin_tools.rb', line 27 def self.tmpdir ["PASSENGER_TEMP_DIR", "PASSENGER_TMPDIR"].each do |name| if ENV.has_key?(name) && !ENV[name].empty? return ENV[name] end end return "/tmp" end |