* 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.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user