From 9658fa80fd81f17508ff8b3413fe9e9ded0b83e6 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 25 Jul 2017 13:10:49 +0300 Subject: Disable displaying error reporting dialog box on Windows for bbot worker --- bbot/worker/worker.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bbot/worker/worker.cxx b/bbot/worker/worker.cxx index 2107dc3..3c74800 100644 --- a/bbot/worker/worker.cxx +++ b/bbot/worker/worker.cxx @@ -5,6 +5,8 @@ #ifndef _WIN32 # include // signal() #else +# include + # include // getenv(), _putenv() #endif @@ -756,10 +758,16 @@ try // terminates a process. Also note that there is no way to disable this // behavior on a file descriptor basis or for the write() function call. // + // On Windows disable displaying error reporting dialog box. Note that the + // error mode is inherited by child processes. + // #ifndef _WIN32 if (signal (SIGPIPE, SIG_IGN) == SIG_ERR) fail << "unable to ignore broken pipe (SIGPIPE) signal: " << system_error (errno, generic_category ()); // Sanitize. +#else + SetErrorMode (SetErrorMode (0) | // Returns the current mode. + SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX); #endif cli::argv_scanner scan (argc, argv, true); -- cgit v1.1