benoitc/gunicorn — pull request #435 by chris-fren (2012-11-15 13:05:38+00:00)
Title: Reopen stderr and stdout after logrotate

To use the logrotate utility, a USR1 signal is sent, and the corresponding handler reopens the log files. However, sys.stdout and sys.stderr, which may be redirected to the error log file, are not updated. This commit fixes this, by closing the fileobj of the LazyWriter object. There is no need to reopen it, since the LazyWriter will open it when needed.