Skip to content

Commit 2a36baa

Browse files
committed
Fix calling condition for Arbiter.log.reopen_files()
`GUNICORN_FD` is not always set in a `reexec`ed child process. Considering `Arbiter.master_pid` is set after log reopening, choose `GUNICORN_PID`.
1 parent 36a478f commit 2a36baa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gunicorn/arbiter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def setup(self, app):
9494
self.log.close_on_exec()
9595

9696
# reopen files
97-
if 'GUNICORN_FD' in os.environ:
97+
if 'GUNICORN_PID' in os.environ:
9898
self.log.reopen_files()
9999

100100
self.worker_class = self.cfg.worker_class

0 commit comments

Comments
 (0)