lib/racecar/daemon.rb in racecar-2.9.0.beta1 vs lib/racecar/daemon.rb in racecar-2.9.0
- old
+ new
@@ -52,11 +52,11 @@
end
end
end
def pid
- if File.exists?(pidfile)
+ if File.exist?(pidfile)
File.read(pidfile).to_i
else
nil
end
end
@@ -87,10 +87,10 @@
File.open(pidfile, ::File::CREAT | ::File::EXCL | ::File::WRONLY) do |f|
f.write(Process.pid.to_s)
end
at_exit do
- File.delete(pidfile) if File.exists?(pidfile)
+ File.delete(pidfile) if File.exist?(pidfile)
end
rescue Errno::EEXIST
check_pid
retry
end