Browse Source

Set signal handler for SIGPIPE to ignore

release/0.19
Jessica James 5 years ago
parent
commit
780d3f12bb
  1. 5
      src/Bot/src/Main.cpp

5
src/Bot/src/Main.cpp

@ -19,6 +19,7 @@
#include <cstdlib> #include <cstdlib>
#include <cstdio> #include <cstdio>
#include <cstring> #include <cstring>
#include <csignal>
#include <exception> #include <exception>
#include <thread> #include <thread>
#include <mutex> #include <mutex>
@ -95,6 +96,10 @@ int main(int argc, const char **args)
Jupiter::ReferenceString command, plugins_directory, configs_directory; Jupiter::ReferenceString command, plugins_directory, configs_directory;
size_t index; size_t index;
#if defined SIGPIPE
std::signal(SIGPIPE, SIG_IGN);
#endif // SIGPIPE
#if defined _WIN32 #if defined _WIN32
// Sets console to UTF-8 // Sets console to UTF-8
SetConsoleCP(65001); SetConsoleCP(65001);

Loading…
Cancel
Save