[ovs-dev] [PATCH 06/10] util: Disable popups while asserting in windows.

Ben Pfaff blp at nicira.com
Wed May 14 18:23:50 UTC 2014


On Tue, May 13, 2014 at 09:03:20AM -0700, Gurucharan Shetty wrote:
> The default behavior for programs is to display a popup
> after an assert/abort etc. This is not an ideal behavior because
> this needs user intervention.
> 
> set_program_name, though not an ideal place to disable this, is
> a useful place because it is called by all programs including
> unit test binaries.
> 
> Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>

Won't this break every non-Windows build?

> ---
>  lib/util.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/lib/util.c b/lib/util.c
> index 3dba335..769558e 100644
> --- a/lib/util.c
> +++ b/lib/util.c
> @@ -458,6 +458,8 @@ set_program_name__(const char *argv0, const char *version, const char *date,
>      char *basename;
>      size_t max_len = strlen(argv0) + 1;
>  
> +    SetErrorMode(GetErrorMode() | SEM_NOGPFAULTERRORBOX);
> +
>      if (program_name) {
>          return;
>      }
> -- 
> 1.7.9.5
> 
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev



More information about the dev mailing list