Drop has_program_compatibility_assistant flag

This commit is contained in:
Corinna Vinschen 2015-12-15 15:53:16 +01:00
parent c356901f0d
commit 8b8c6c014b
3 changed files with 28 additions and 41 deletions

View File

@ -405,18 +405,16 @@ 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_assistant ())
{
/* We're adding the CREATE_BREAKAWAY_FROM_JOB flag here to workaround
issues with the "Program Compatibility Assistant (PCA) Service"
starting with Windows Vista. 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.
issues with the "Program Compatibility Assistant (PCA) Service".
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.
First we call IsProcessInJob. It fetches the information whether or
not we're part of a job 20 times faster than QueryInformationJobObject.
@ -424,7 +422,6 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv,
(*) Note that this is not mintty's fault. It has just been observed
with mintty in the first place. See the archives for more info:
http://cygwin.com/ml/cygwin-developers/2012-02/msg00018.html */
JOBOBJECT_BASIC_LIMIT_INFORMATION jobinfo;
BOOL is_in_job;
@ -438,7 +435,6 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv,
debug_printf ("Add CREATE_BREAKAWAY_FROM_JOB");
c_flags |= CREATE_BREAKAWAY_FROM_JOB;
}
}
if (mode == _P_DETACH)
c_flags |= DETACHED_PROCESS;

View File

@ -25,7 +25,6 @@ wincaps wincap_xpsp2 __attribute__((section (".cygwin_dll_common"), shared)) = {
has_gaa_largeaddress_bug:false,
has_broken_alloc_console:false,
has_console_logon_sid:false,
has_program_compatibility_assistant:false,
has_pipe_reject_remote_clients:false,
terminate_thread_frees_stack:false,
has_precise_system_time:false,
@ -46,7 +45,6 @@ wincaps wincap_2003 __attribute__((section (".cygwin_dll_common"), shared)) = {
has_gaa_largeaddress_bug:false,
has_broken_alloc_console:false,
has_console_logon_sid:false,
has_program_compatibility_assistant:false,
has_pipe_reject_remote_clients:false,
terminate_thread_frees_stack:false,
has_precise_system_time:false,
@ -67,7 +65,6 @@ wincaps wincap_vista __attribute__((section (".cygwin_dll_common"), shared)) = {
has_gaa_largeaddress_bug:true,
has_broken_alloc_console:false,
has_console_logon_sid:false,
has_program_compatibility_assistant:true,
has_pipe_reject_remote_clients:true,
terminate_thread_frees_stack:true,
has_precise_system_time:false,
@ -88,7 +85,6 @@ wincaps wincap_7 __attribute__((section (".cygwin_dll_common"), shared)) = {
has_gaa_largeaddress_bug:true,
has_broken_alloc_console:true,
has_console_logon_sid:true,
has_program_compatibility_assistant:true,
has_pipe_reject_remote_clients:true,
terminate_thread_frees_stack:true,
has_precise_system_time:false,
@ -109,7 +105,6 @@ wincaps wincap_8 __attribute__((section (".cygwin_dll_common"), shared)) = {
has_gaa_largeaddress_bug:false,
has_broken_alloc_console:true,
has_console_logon_sid:true,
has_program_compatibility_assistant:true,
has_pipe_reject_remote_clients:true,
terminate_thread_frees_stack:true,
has_precise_system_time:true,
@ -130,7 +125,6 @@ wincaps wincap_10 __attribute__((section (".cygwin_dll_common"), shared)) = {
has_gaa_largeaddress_bug:false,
has_broken_alloc_console:true,
has_console_logon_sid:true,
has_program_compatibility_assistant:true,
has_pipe_reject_remote_clients:true,
terminate_thread_frees_stack:true,
has_precise_system_time:true,
@ -151,7 +145,6 @@ wincaps wincap_10_1511 __attribute__((section (".cygwin_dll_common"), shared)) =
has_gaa_largeaddress_bug:false,
has_broken_alloc_console:true,
has_console_logon_sid:true,
has_program_compatibility_assistant:true,
has_pipe_reject_remote_clients:true,
terminate_thread_frees_stack:true,
has_precise_system_time:true,

View File

@ -18,7 +18,6 @@ struct wincaps
unsigned has_gaa_largeaddress_bug : 1;
unsigned has_broken_alloc_console : 1;
unsigned has_console_logon_sid : 1;
unsigned has_program_compatibility_assistant : 1;
unsigned has_pipe_reject_remote_clients : 1;
unsigned terminate_thread_frees_stack : 1;
unsigned has_precise_system_time : 1;
@ -64,7 +63,6 @@ public:
bool IMPLEMENT (has_gaa_largeaddress_bug)
bool IMPLEMENT (has_broken_alloc_console)
bool IMPLEMENT (has_console_logon_sid)
bool IMPLEMENT (has_program_compatibility_assistant)
bool IMPLEMENT (has_pipe_reject_remote_clients)
bool IMPLEMENT (terminate_thread_frees_stack)
bool IMPLEMENT (has_precise_system_time)