From 7a53924aede6415898a5f4a01b5d0345cf125c9a Mon Sep 17 00:00:00 2001 From: Igor Zinkovsky Date: Tue, 1 Nov 2011 15:23:07 -0700 Subject: [PATCH] windows: call SetErrorMode on startup to ask the system not to handle critical errors --- src/win/core.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/win/core.c b/src/win/core.c index 2fa8130f..3267b0cf 100644 --- a/src/win/core.c +++ b/src/win/core.c @@ -40,6 +40,10 @@ static uv_once_t uv_default_loop_init_guard_ = UV_ONCE_INIT; static void uv_init(void) { + /* Tell Windows that we will handle critical errors. */ + SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | + SEM_NOOPENFILEERRORBOX); + /* Initialize winsock */ uv_winsock_init();