Skip to content

Commit

Permalink
Set signal handler for SIGPIPE to ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
JAJames committed Oct 12, 2019
1 parent b9d976e commit 780d3f1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Bot/src/Main.cpp
Expand Up @@ -19,6 +19,7 @@
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <csignal>
#include <exception>
#include <thread>
#include <mutex>
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 780d3f1

Please sign in to comment.