summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlin Gabriel Serdean <aserdean@ovn.org>2017-08-25 20:48:18 +0300
committerAlin Gabriel Serdean <aserdean@ovn.org>2017-09-02 00:03:32 +0300
commit4fbe77d8deebd8e98953cd2c74051bb23a19af72 (patch)
treedb4b335ef1f28811e0bf4a81bd40c8528468689e
parent42206c5fefe5675312cd88b1a166ab38de2b43e0 (diff)
downloadopenvswitch-2.8.0.tar.gz
daemon-windows: Set default error mode for servicesv2.8.0
Microsoft allows default process memory dumps via WER (Windows Error Reporting). WER can be set to collect dumps using in general using: https://msdn.microsoft.com/en-us/library/windows/desktop/bb787181(v=vs.85).aspx If a normal application crashes, the user will receive a pop-up dialog, in which he will be asked of his consent on what will be the steps after the dump was created (debug, close or send the dump to MSFT). We disable the dump creation via WER in: https://github.com/openvswitch/ovs/blob/master/lib/util.c#L492 because the idea is we don't want a pop-up if a OVS process (eg. ovs-vsctl) has crashed. (more information on the subject: https://blogs.msdn.microsoft.com/oldnewthing/20040727-00/?p=38323) Until we implement our own dump collection mechanism, we can set the default error mode for services because there are no pop-ups allowed in that case. Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org> Requested-by: Anand Kumar <kumaranand@vmware.com> Acked-by: Anand Kumar <kumaranand@vmware.com>
-rw-r--r--lib/daemon-windows.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/daemon-windows.c b/lib/daemon-windows.c
index 1ba714dac..2ba62d21a 100644
--- a/lib/daemon-windows.c
+++ b/lib/daemon-windows.c
@@ -138,6 +138,12 @@ service_start(int *argcp, char **argvp[])
*argcp = sargc;
*argvp = *sargvp;
+ /* Enable default error mode so we can take advantage of WER
+ * (Windows Error Reporting) crash dumps.
+ * Being a service it does not allow for WER window pop-up.
+ * XXX implement our on crash dump collection mechanism. */
+ SetErrorMode(0);
+
return;
}