From f7151821c66769ffe6e05321d5edb4ed381edda1 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 4 Sep 2014 15:35:40 -0700 Subject: [PATCH] arbiter: reopen log files first then signal workers Workers may run under different uid/gid and don't have permission to create log files. After master opens log files and makes them rw-able when default umask is used, workers will be able to open them upon receiving USR1. --- gunicorn/arbiter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gunicorn/arbiter.py b/gunicorn/arbiter.py index df2616f3..685b4a8a 100644 --- a/gunicorn/arbiter.py +++ b/gunicorn/arbiter.py @@ -256,8 +256,8 @@ class Arbiter(object): SIGUSR1 handling. Kill all workers by sending them a SIGUSR1 """ - self.kill_workers(signal.SIGUSR1) self.log.reopen_files() + self.kill_workers(signal.SIGUSR1) def handle_usr2(self): """\