diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2011-12-07 14:48:17 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2011-12-07 14:48:17 +0400 |
commit | 47de562e7c33ecfa712e000297f10392f3150ba4 (patch) | |
tree | 1a96d105db733c749454455d985abb2ae322bd64 | |
parent | 9bab9bfeb5a9eb0247ebe2edd261eb7b93887a1b (diff) |
* spawn.cc (child_info_spawn::worker): Add CREATE_BREAKAWAY_FROM_JOB
to all spawned processes. Explain why.
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/spawn.cc | 12 |
2 files changed, 16 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 9acf2b34b..27316a096 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2011-12-07 Corinna Vinschen <vinschen@redhat.com> + + * spawn.cc (child_info_spawn::worker): Add CREATE_BREAKAWAY_FROM_JOB + to all spawned processes. Explain why. + 2011-12-06 Christopher Faylor <me.cygwin2011@cgf.cx> * fhandler_fifo.cc (fhandler_fifo::wait): Fix stupid typo and actually diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 75bde2a3f..a509e03cb 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -452,7 +452,17 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv, c_flags = GetPriorityClass (GetCurrentProcess ()); sigproc_printf ("priority class %d", c_flags); - c_flags |= CREATE_SEPARATE_WOW_VDM | CREATE_UNICODE_ENVIRONMENT; + /* We're adding the CREATE_BREAKAWAY_FROM_JOB flag here to workaround issues + with the "Program Compatibility Assistant (PCA) Service" observed on + Windows 7. For some reason, when starting long running sessions from + mintty, the affected svchost.exe process takes more and more memory and + at one point takes over the CPU. At this point the machine becomes + unresponsive. The only way to get back to normal is to stop the entire + mintty session, or to stop the PCA service. However, a process which + is controlled by PCA is part of a compatibility job, which allows child + processes to break away from the job. This helps to avoid this issue. */ + c_flags |= CREATE_SEPARATE_WOW_VDM | CREATE_UNICODE_ENVIRONMENT + | CREATE_BREAKAWAY_FROM_JOB; if (mode == _P_DETACH) c_flags |= DETACHED_PROCESS; |