From 587114651912e2af746528fc3048919eaa2f4e9d Mon Sep 17 00:00:00 2001 From: Unbit Date: Tue, 13 May 2014 12:49:58 +0200 Subject: [PATCH] ensure SIGPIPE is ignored in gevent mode --- plugins/gevent/gevent.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/gevent/gevent.c b/plugins/gevent/gevent.c index 0debbdaf..15782fcf 100644 --- a/plugins/gevent/gevent.c +++ b/plugins/gevent/gevent.c @@ -345,6 +345,9 @@ static void gil_gevent_release() { static void gevent_loop() { + // ensure SIGPIPE is ignored + signal(SIGPIPE, SIG_IGN); + if (!uwsgi.has_threads && uwsgi.mywid == 1) { uwsgi_log("!!! Running gevent without threads IS NOT recommended, enable them with --enable-threads !!!\n"); }