Module: Process

Defined in:
lib/daemonizing.rb

Class Method Summary collapse

Class Method Details

.running?(pid) ⇒ Boolean

Returns true if the process identifed by pid is running.

Returns:

  • (Boolean)


6
7
8
9
10
# File 'lib/daemonizing.rb', line 6

def running?(pid)
  Process.getpgid(pid) != -1
rescue Errno::ESRCH
  false
end