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:
authorChristopher Faylor <me@cgf.cx>2006-08-09 19:04:32 +0400
committerChristopher Faylor <me@cgf.cx>2006-08-09 19:04:32 +0400
commitbbf38a55c6d1df220bd0160a99907048b6d215a0 (patch)
tree1c41c0a7d38123bfa2ff20fe7a337fc3e1e7dfab /winsup/cygwin/spawn.cc
parent7636b58590621af3c341c3eb37a017e0e6598d3f (diff)
* autoload.cc (GetHandleInformation): Declare new function.
(SetHandleInformation): Ditto. * debug.cc (add_handle): Use SetHandleInformation to protect handle. (close_handle): Use SetHandleInformation to unprotect handle. * spawn.cc (spawn_guts): Move detached test outside of P_OVERLAY block.
Diffstat (limited to 'winsup/cygwin/spawn.cc')
-rw-r--r--winsup/cygwin/spawn.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
index d1ee321e5..2771d87e0 100644
--- a/winsup/cygwin/spawn.cc
+++ b/winsup/cygwin/spawn.cc
@@ -422,6 +422,8 @@ spawn_guts (const char * prog_arg, const char *const *argv,
if (mode == _P_DETACH)
c_flags |= DETACHED_PROCESS;
+ else
+ set_console_state_for_spawn (real_path.iscygexec ());
if (mode != _P_OVERLAY)
myself->exec_sendsig = NULL;
@@ -447,8 +449,6 @@ spawn_guts (const char * prog_arg, const char *const *argv,
ProtectHandleINH (cygheap->pid_handle);
else
system_printf ("duplicate to pid_handle failed, %E");
- if (mode != _P_DETACH)
- set_console_state_for_spawn (real_path.iscygexec ());
}
/* Some file types (currently only sockets) need extra effort in the parent