summaryrefslogtreecommitdiff
path: root/lib/oxidized/cli.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/oxidized/cli.rb')
-rw-r--r--lib/oxidized/cli.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/oxidized/cli.rb b/lib/oxidized/cli.rb
index 23cc28c..9fdc9b2 100644
--- a/lib/oxidized/cli.rb
+++ b/lib/oxidized/cli.rb
@@ -85,8 +85,10 @@ module Oxidized
def pid_status(pidfile)
return :exited unless File.exists?(pidfile)
+
pid = ::File.read(pidfile).to_i
return :dead if pid == 0
+
Process.kill(0, pid)
:running
rescue Errno::ESRCH