aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2015-09-15 01:39:12 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2015-09-18 15:38:52 +0200
commit5ce43da03dff3ee655949cd53d952dace555e268 (patch)
tree422f7bda106f05ed6234c11c0d42391a6ac00acf /src/init.cpp
parent3224936bedd8fe777b23d43c253abd2c0cd95d22 (diff)
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.
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp4
1 files changed, 1 insertions, 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,11 +687,9 @@ 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
const CChainParams& chainparams = Params();