From c48db0f9f955a35da5532b49f2d62f00fa625e7b Mon Sep 17 00:00:00 2001 From: CPunch Date: Wed, 26 Aug 2020 14:38:09 -0500 Subject: [PATCH] ignore SIGPIPE --- src/main.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 929fd7c..5ed0e35 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -27,6 +27,9 @@ int main() { std::cerr << "OpenFusion: WSAStartup failed" << std::endl; exit(EXIT_FAILURE); } +#else + // tell the OS to not kill us if you use a broken pipe, just let us know thru recv() or send() + signal(SIGPIPE, SIG_IGN); #endif settings::init(); std::cout << "[INFO] Protocol version: " << PROTOCOL_VERSION << std::endl;