celery/celery — pull request #2291 by vstoykov (2014-09-30 12:24:38+00:00)
Title: Broken Pipe on `safe_say`

When celery is started with uWSGI and `smart-attach-daemon` option and when celery is once restarted then calling `safe_say` will raise Broken Pipe error. This will prevent further restarting of the worker without brutally killing it.

In python documentation `sys.stderr` is prefered way for writing to stderr instead of `sys.__stderr__`, and when it is used in safe_say, the celery worker is restarted without problems.