From 99fe31b212d72f0b1f8d6b46a4eaceca1fad690a Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 22 Aug 2017 08:20:26 +0300 Subject: Fix disabling error reporting dialog box to properly test for serial execution --- build2/b.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/build2/b.cxx b/build2/b.cxx index 1510b39..f4c249b 100644 --- a/build2/b.cxx +++ b/build2/b.cxx @@ -112,10 +112,6 @@ main (int argc, char* argv[]) if (signal (SIGPIPE, SIG_IGN) == SIG_ERR) fail << "unable to ignore broken pipe (SIGPIPE) signal: " << system_error (errno, generic_category ()); // Sanitize. -#else - if (!ops.serial_stop ()) - SetErrorMode (SetErrorMode (0) | // Returns the current mode. - SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX); #endif // Parse the command line. We want to be able to specify options, vars, @@ -300,6 +296,12 @@ main (int argc, char* argv[]) } } +#ifdef _WIN32 + if (!ops.serial_stop ()) + SetErrorMode (SetErrorMode (0) | // Returns the current mode. + SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX); +#endif + // Register builtin modules. // { -- cgit v1.1