incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject Re: [PATCH] THREAD_SAFE_EXCEPTIONS.cpp
Date Tue, 03 Oct 2006 15:33:54 GMT
Farid Zaripov wrote:
>   Attached is a patch to disable displaying general protection fault 
> message box in test on Windows (singlethreaded configurations).

Looks good, thanks!

Martin

PS If this is needed in more than one test we might want to
introduce a common header with a function that handles it
(conditionally for Windows).

Martin

> 
> Farid.
> 
> 
> ------------------------------------------------------------------------
> 
> Index: THREAD_SAFE_EXCEPTIONS.cpp
> ===================================================================
> --- THREAD_SAFE_EXCEPTIONS.cpp	(revision 452510)
> +++ THREAD_SAFE_EXCEPTIONS.cpp	(working copy)
> @@ -29,6 +29,13 @@
>  
>  int main ()
>  {
> +#if defined (_WIN32)
> +    // disable displaying the critical-error-handler
> +    // and general-protection-fault message boxes
> +    // windows.h included in thread.h
> +    SetErrorMode (SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX);
> +#endif   // _WIN32
> +
>      pthread_t tid [2];
>  
>      const unsigned N = sizeof tid / sizeof *tid;


Mime
View raw message