Fix error if pidfile exists and process not exists

This commit is contained in:
uu59 2014-05-27 10:56:41 +09:00
parent ebcb12285f
commit 264e71107d

View File

@ -33,7 +33,12 @@ class Fluentd
end
def running?
begin
pid && Process.kill(0, pid)
rescue Errno::ESRCH
File.unlink(pid_file) # no needed any more
false
end
end
def log