From 7637b51ba51c5e822657ce9de94a34b9d0b75308 Mon Sep 17 00:00:00 2001 From: orignal Date: Mon, 20 Mar 2017 09:52:43 -0400 Subject: [PATCH] fix #833. Handle SIGPIPE --- DaemonLinux.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/DaemonLinux.cpp b/DaemonLinux.cpp index 416b6d2c..f282f2d4 100644 --- a/DaemonLinux.cpp +++ b/DaemonLinux.cpp @@ -42,6 +42,9 @@ void handle_signal(int sig) case SIGTERM: Daemon.running = 0; // Exit loop break; + case SIGPIPE: + LogPrint(eLogInfo, "SIGPIPE received"); + break; } } @@ -160,6 +163,7 @@ namespace i2p sigaction(SIGABRT, &sa, 0); sigaction(SIGTERM, &sa, 0); sigaction(SIGINT, &sa, 0); + sigaction(SIGPIPE, &sa, 0); return Daemon_Singleton::start(); }