Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2008-04-26 22:01:42 +0400
committerCorinna Vinschen <corinna@vinschen.de>2008-04-26 22:01:42 +0400
commit346cdb434ea2a8a158075e21a283abb5c0ed4998 (patch)
treeee4bc183c974d93e19f5bc3e8a1ac11a9639c00e
parente331d3e26e0dc9f6b80ae3ece78661d741822474 (diff)
* dcrt0.cc (dll_crt0_0): Set SEM_NOGPFAULTERRORBOX error mode, too,
to accommodate Vista/Longhorn. * spawn.cc (spawn_guts): Move check for CREATE_SUSPENDED condition after the call to ch.set() since it depends on it.
-rw-r--r--winsup/cygwin/ChangeLog7
-rw-r--r--winsup/cygwin/dcrt0.cc2
-rw-r--r--winsup/cygwin/spawn.cc18
3 files changed, 17 insertions, 10 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index dd4032e4a..7cdd1f882 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,10 @@
+2008-04-26 Corinna Vinschen <corinna@vinschen.de>
+
+ * dcrt0.cc (dll_crt0_0): Set SEM_NOGPFAULTERRORBOX error mode, too,
+ to accommodate Vista/Longhorn.
+ * spawn.cc (spawn_guts): Move check for CREATE_SUSPENDED condition
+ after the call to ch.set() since it depends on it.
+
2008-04-25 Corinna Vinschen <corinna@vinschen.de>
* Makefile.in (install): Drop install rules for postinstall script.
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc
index 7b299d3dd..e0fa5b5b1 100644
--- a/winsup/cygwin/dcrt0.cc
+++ b/winsup/cygwin/dcrt0.cc
@@ -694,7 +694,7 @@ dll_crt0_0 ()
init_global_security ();
initial_env ();
- SetErrorMode (SEM_FAILCRITICALERRORS);
+ SetErrorMode (SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX);
/* Initialize signal processing here, early, in the hopes that the creation
of a thread early in the process will cause more predictability in memory
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
index a6c3fe7e5..e4baadef0 100644
--- a/winsup/cygwin/spawn.cc
+++ b/winsup/cygwin/spawn.cc
@@ -471,15 +471,6 @@ spawn_guts (const char *prog_arg, const char *const *argv,
system_printf ("duplicate to pid_handle failed, %E");
}
- /* Some file types (currently only sockets) need extra effort in the parent
- after CreateProcess and before copying the datastructures to the child.
- So we have to start the child in suspend state, unfortunately, to avoid
- a race condition. */
- if (!newargv.win16_exe
- && (!ch.iscygwin () || mode != _P_OVERLAY
- || cygheap->fdtab.need_fixup_before ()))
- c_flags |= CREATE_SUSPENDED;
-
runpath = null_app_name ? NULL : real_path.get_wide_win32_path (runpath);
syscall_printf ("null_app_name %d (%W, %.9500W)", null_app_name,
@@ -506,6 +497,15 @@ spawn_guts (const char *prog_arg, const char *const *argv,
si.lpReserved2 = (LPBYTE) &ch;
si.cbReserved2 = sizeof (ch);
+ /* Depends on ch.set call above!
+ Some file types might need extra effort in the parent after CreateProcess
+ and before copying the datastructures to the child. So we have to start
+ the child in suspend state, unfortunately, to avoid a race condition. */
+ if (!newargv.win16_exe
+ && (!ch.iscygwin () || mode != _P_OVERLAY
+ || cygheap->fdtab.need_fixup_before ()))
+ c_flags |= CREATE_SUSPENDED;
+
/* When ruid != euid we create the new process under the current original
account and impersonate in child, this way maintaining the different
effective vs. real ids.