From stdcxx-commits-return-908-apmail-incubator-stdcxx-commits-archive=incubator.apache.org@incubator.apache.org Fri Aug 25 22:28:34 2006 Return-Path: Delivered-To: apmail-incubator-stdcxx-commits-archive@www.apache.org Received: (qmail 35469 invoked from network); 25 Aug 2006 22:28:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 25 Aug 2006 22:28:32 -0000 Received: (qmail 25441 invoked by uid 500); 25 Aug 2006 22:28:32 -0000 Delivered-To: apmail-incubator-stdcxx-commits-archive@incubator.apache.org Received: (qmail 25421 invoked by uid 500); 25 Aug 2006 22:28:32 -0000 Mailing-List: contact stdcxx-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-commits@incubator.apache.org Received: (qmail 25405 invoked by uid 99); 25 Aug 2006 22:28:32 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Aug 2006 15:28:32 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [140.211.166.113] (HELO eris.apache.org) (140.211.166.113) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Aug 2006 15:28:31 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id E56731A981A; Fri, 25 Aug 2006 15:28:10 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r436990 - in /incubator/stdcxx/trunk/util: exec.cpp runall.cpp Date: Fri, 25 Aug 2006 22:28:10 -0000 To: stdcxx-commits@incubator.apache.org From: sebor@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20060825222810.E56731A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: sebor Date: Fri Aug 25 15:28:09 2006 New Revision: 436990 URL: http://svn.apache.org/viewvc?rev=436990&view=rev Log: 2006-08-25 Farid Zaripov * exec.cpp [_WIN32 || _WIN64] (exec_file): Set appropriate error mode before running the child process to disable displaying the critical error-handler and general-protection-fault message boxes. * runall.cpp [_WIN32 || _WIN64]: Included windows.h and signal.h. (process_results): Handle returned status STATUS_ACCESS_VIOLATION and print status "SEGV". Modified: incubator/stdcxx/trunk/util/exec.cpp incubator/stdcxx/trunk/util/runall.cpp Modified: incubator/stdcxx/trunk/util/exec.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/util/exec.cpp?rev=436990&r1=436989&r2=436990&view=diff ============================================================================== --- incubator/stdcxx/trunk/util/exec.cpp (original) +++ incubator/stdcxx/trunk/util/exec.cpp Fri Aug 25 15:28:09 2006 @@ -930,6 +930,11 @@ merged = merge_argv (argv); + /* set appropriate error mode (the child process inherits this + error mode) to disable displaying the critical-error-handler + and general-protection-fault message boxes */ + UINT old_mode = SetErrorMode (SEM_FAILCRITICALERRORS + | SEM_NOGPFAULTERRORBOX); /* Create the child process */ if (0 == CreateProcess (argv [0], merged, 0, 0, 1, CREATE_NEW_PROCESS_GROUP, 0, 0, &context, &child)) { @@ -937,6 +942,9 @@ status.status = -1; status.error = warn_last_error ("Creating child process");; } + + /* restore the previous error mode */ + SetErrorMode (old_mode); /* Clean up handles */ if (context.hStdInput) Modified: incubator/stdcxx/trunk/util/runall.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/util/runall.cpp?rev=436990&r1=436989&r2=436990&view=diff ============================================================================== --- incubator/stdcxx/trunk/util/runall.cpp (original) +++ incubator/stdcxx/trunk/util/runall.cpp Fri Aug 25 15:28:09 2006 @@ -35,6 +35,8 @@ #include #if !defined (_WIN32) && !defined (_WIN64) # include /* for WIFEXITED(), ... */ +#else +# include /* for STATUS_ACCESS_VIOLATION */ #endif #include "cmdopt.h" @@ -353,6 +355,8 @@ puts (" I/O"); else if (result->error) puts ("KILLED"); + else if (STATUS_ACCESS_VIOLATION == result->status) + puts (" SEGV"); else printf ("%6d\n", result->status); #endif /* _WIN{32,64} */