Browse Source

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.
pull/4/head
Wladimir J. van der Laan 9 years ago
committed by Jack Grigg
parent
commit
7ed4d40c61
No known key found for this signature in database GPG Key ID: 6A6914DAFBEA00DA
  1. 4
      src/init.cpp

4
src/init.cpp

@ -747,10 +747,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

Loading…
Cancel
Save