Skip to content

Commit

Permalink
Prevent signals from being sent to pid 0
Browse files Browse the repository at this point in the history
 * Closes #544
  • Loading branch information
raggi committed Apr 21, 2013
1 parent 9939d40 commit 688516a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/rack/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,8 @@ 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
Expand Down

0 comments on commit 688516a

Please sign in to comment.