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

Gurucharan Shetty shettyg at nicira.com
Tue May 13 16:03:20 UTC 2014

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>
 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) {

More information about the dev mailing list