Module: Process

Defined in:
lib/smartfox_jruby/common.rb

Class Method Summary collapse

Class Method Details

.alive?(pid) ⇒ Boolean

Returns:

  • (Boolean)


146
147
148
149
150
151
152
153
154
# File 'lib/smartfox_jruby/common.rb', line 146

def self.alive?(pid)
  return false unless pid
  begin
    Process.kill(0, pid)
    true
  rescue Errno::ESRCH
    false
  end
end