From 780d3f12bb345a8769c83599aeebd94152692964 Mon Sep 17 00:00:00 2001 From: Jessica James Date: Sat, 12 Oct 2019 16:20:22 -0500 Subject: [PATCH] Set signal handler for SIGPIPE to ignore --- src/Bot/src/Main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Bot/src/Main.cpp b/src/Bot/src/Main.cpp index 77ff866..9f7ebbe 100644 --- a/src/Bot/src/Main.cpp +++ b/src/Bot/src/Main.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -95,6 +96,10 @@ int main(int argc, const char **args) Jupiter::ReferenceString command, plugins_directory, configs_directory; size_t index; +#if defined SIGPIPE + std::signal(SIGPIPE, SIG_IGN); +#endif // SIGPIPE + #if defined _WIN32 // Sets console to UTF-8 SetConsoleCP(65001);