From 5ce43da03dff3ee655949cd53d952dace555e268 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Tue, 15 Sep 2015 01:39:12 +0200 Subject: [PATCH] init: Ignore SIGPIPE Ignore SIGPIPE on all non-win32 OSes, otherwise an unexpectedly disconnecting RPC client will terminate the application. This problem was introduced with the libhttp-based RPC server. Fixes #6660. --- src/init.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index a12e38ff53..276effe582 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -687,10 +687,8 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) sa_hup.sa_flags = 0; sigaction(SIGHUP, &sa_hup, NULL); -#if defined (__SVR4) && defined (__sun) - // ignore SIGPIPE on Solaris + // Ignore SIGPIPE, otherwise it will bring the daemon down if the client closes unexpectedly signal(SIGPIPE, SIG_IGN); -#endif #endif // ********************************************************* Step 2: parameter interactions