diff options
-rw-r--r-- | bbot/worker/worker.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
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.h> // signal() #else +# include <libbutl/win32-utility.hxx> + # include <stdlib.h> // 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); |