lib/rack/server.rb in rack-1.4.5 vs lib/rack/server.rb in rack-1.4.6
- old
+ new
@@ -335,9 +335,11 @@
def pidfile_process_status
return :exited unless ::File.exist?(options[:pid])
pid = ::File.read(options[:pid]).to_i
+ return :dead if pid == 0
+
Process.kill(0, pid)
:running
rescue Errno::ESRCH
:dead
rescue Errno::EPERM