summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/dcrt0.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/dcrt0.cc')
-rw-r--r--winsup/cygwin/dcrt0.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc
index 0518ac28f..5f7f2708b 100644
--- a/winsup/cygwin/dcrt0.cc
+++ b/winsup/cygwin/dcrt0.cc
@@ -702,6 +702,8 @@ dll_crt0_0 ()
init_global_security ();
initial_env ();
+ SetErrorMode (SEM_FAILCRITICALERRORS);
+
/* Initialize signal processing here, early, in the hopes that the creation
of a thread early in the process will cause more predictability in memory
layout for the main thread. */
@@ -727,7 +729,6 @@ dll_crt0_0 ()
if (wincap.has_security ())
OpenProcessToken (hMainProc, MAXIMUM_ALLOWED, &hProcToken);
- SetErrorMode (SEM_FAILCRITICALERRORS);
device::init ();
do_global_ctors (&__CTOR_LIST__, 1);
cygthread::init ();