From b2a88e7b885cd43882b525fdaf2b57dd931a0427 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Thu, 9 Sep 2021 20:55:53 +0200 Subject: [PATCH] fix(redis-storage): Ignore SIGPIPE MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit libhiredis doesn’t pass MSG_NOSIGNAL to send to ccache can die from SIGPIPE. Disable SIGPIPE so that the socket code receives EPIPE correctly. This should also fix a similar problem with the HTTP storage backend. Fixes #931. --- src/SignalHandler.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/SignalHandler.cpp b/src/SignalHandler.cpp index 9051eeb0d..2d32ac6d0 100644 --- a/src/SignalHandler.cpp +++ b/src/SignalHandler.cpp @@ -71,6 +71,8 @@ SignalHandler::SignalHandler(Context& ctx) : m_ctx(ctx) # ifdef SIGQUIT register_signal_handler(SIGQUIT); # endif + + signal(SIGPIPE, SIG_IGN); // NOLINT: This is no error, clang-tidy } SignalHandler::~SignalHandler() -- 2.47.2