Module: Process

Defined in:
lib/raad/unix_daemon.rb

Class Method Summary collapse

Class Method Details

.running?(pid) ⇒ Boolean

Returns:

  • (Boolean)


8
9
10
11
12
13
14
# File 'lib/raad/unix_daemon.rb', line 8

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