diff options
author | Eric Wong <normalperson@yhbt.net> | 2012-03-20 20:05:59 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2012-03-20 20:08:15 +0000 |
commit | d0e7d8d770275654024887a05d9e986589ba358c (patch) | |
tree | f0c75676105336b3dbd8af83db0db21a37400296 /lib/unicorn | |
parent | 1e13ffee3469997286e65e0563b6433e7744388a (diff) | |
download | unicorn-d0e7d8d770275654024887a05d9e986589ba358c.tar.gz |
In some cases, EPERM may indicate a real configuration problem, but it can also just mean the pid file is stale.
Diffstat (limited to 'lib/unicorn')
-rw-r--r-- | lib/unicorn/http_server.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/unicorn/http_server.rb b/lib/unicorn/http_server.rb index 0c2af5d..ede6264 100644 --- a/lib/unicorn/http_server.rb +++ b/lib/unicorn/http_server.rb @@ -656,7 +656,10 @@ class Unicorn::HttpServer wpid <= 0 and return Process.kill(0, wpid) wpid - rescue Errno::ESRCH, Errno::ENOENT, Errno::EPERM + rescue Errno::EPERM + logger.info "pid=#{path} possibly stale, got EPERM signalling PID:#{wpid}" + nil + rescue Errno::ESRCH, Errno::ENOENT # don't unlink stale pid files, racy without non-portable locking... end |