diff --git a/gunicorn/pidfile.py b/gunicorn/pidfile.py index 7f7f844f..a6e085fd 100644 --- a/gunicorn/pidfile.py +++ b/gunicorn/pidfile.py @@ -75,6 +75,8 @@ class Pidfile(object): os.kill(wpid, 0) return wpid except OSError as e: + if e.args[0] == errno.EPERM: + return wpid if e.args[0] == errno.ESRCH: return raise