diff options
author | Christopher Faylor <me@cgf.cx> | 2012-04-15 21:51:22 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2012-04-15 21:51:22 +0400 |
commit | aba77cbe8fddb0c1d9d544eee03aa95faf180c01 (patch) | |
tree | c33ce1d5fe9ce2a1d59cc4fbc59f0f87a4849dd1 /winsup/cygwin/spawn.cc | |
parent | 0a3819e6558be56d5846fe38ff3a48bc88c8fd91 (diff) |
wincap.h: Rename assitant to assistant throughout. wincap.cc: Ditto.
* devices.in (exists_console): Use fhandler_console::exists () rather than raw
test.
* devices.cc: Regenerate.
* fhandler.h (fhandler_console::exists): Define new function.
* fhandler_console.cc (fhandler_console::need_invisible): Use
fhandler_console::exists () rather than raw test.
* spawn.cc: Rename assitant to assistant throughout.
(child_info_spawn::worker): Simplify test for when to start a non-Cygwin
process in its own process group. Just do it whenever we start a non-Cygwin
process.
Diffstat (limited to 'winsup/cygwin/spawn.cc')
-rw-r--r-- | winsup/cygwin/spawn.cc | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index c05c7af9f..d296597d1 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -453,7 +453,7 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, c_flags |= CREATE_SEPARATE_WOW_VDM | CREATE_UNICODE_ENVIRONMENT; - if (wincap.has_program_compatibility_assitant ()) + if (wincap.has_program_compatibility_assistant ()) { /* We're adding the CREATE_BREAKAWAY_FROM_JOB flag here to workaround issues with the "Program Compatibility Assistant (PCA) Service" @@ -599,16 +599,10 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, && (!iscygwin () || mode != _P_OVERLAY || ::cygheap->fdtab.need_fixup_before ())) c_flags |= CREATE_SUSPENDED; - /* If a native application should be spawned, we test here if the spawning - process is running in a console and, if so, if it's a foreground or - background process. If it's a background process, we start the native - process with the CREATE_NEW_PROCESS_GROUP flag set. This lets the native - process ignore Ctrl-C by default. If we don't do that, pressing Ctrl-C - in a console will break native processes running in the background, - because the Ctrl-C event is sent to all processes in the console, unless - they ignore it explicitely. CREATE_NEW_PROCESS_GROUP does that for us. */ - if (!iscygwin () && myself->ctty >= 0 && iscons_dev (myself->ctty) - && fhandler_console::tc_getpgid () != myself->pgid) + /* Give non-Cygwin processes their own process group since they will be + dealing with CTRL-C themselves. Not sure if this is correct for spawn*() + or not though. */ + if (!iscygwin () && fhandler_console::exists ()) c_flags |= CREATE_NEW_PROCESS_GROUP; refresh_cygheap (); |