Start the server if another user has a PID matching our stale pidfile.
commit2ce57950e0f61eb6f325a93cef9b7e0e598fc109
authorGraham Bleach <graham@darkskills.org.uk>
Wed, 29 Feb 2012 14:34:44 +0000 (29 14:34 +0000)
committerEric Wong <normalperson@yhbt.net>
Wed, 29 Feb 2012 17:12:30 +0000 (29 17:12 +0000)
tree39eb491ca57fa5d15dbaa1faa331e47a3b432b32
parentb6a154eba6d79fd1572f61290e55f4d05df86730
Start the server if another user has a PID matching our stale pidfile.

If unicorn doesn't get terminated cleanly (for example if the machine
has its power interrupted) and the pid in the pidfile gets used by
another process, the current unicorn code will exit and not start a
server. This tiny patch fixes that behaviour.

Acked-by: Eric Wong <normalperson@yhbt.net>
lib/unicorn/http_server.rb