- This patch skips unnecessary term_has_pcon_cap() call if pseudo
console is disabled.
if (get_ttyp ()->pcon_pid && get_ttyp ()->pcon_pid != myself->pid
&& !!pinfo (get_ttyp ()->pcon_pid))
return false;
- if (disable_pcon)
- return false;
/* If the legacy console mode is enabled, pseudo console seems
not to work as expected. To determine console mode, registry
key ForceV2 in HKEY_CURRENT_USER\Console is checked. */
if (!iscygwin () && ptys_primary && is_console_app (runpath))
{
bool nopcon = mode != _P_OVERLAY && mode != _P_WAIT;
- if (!ptys_primary->term_has_pcon_cap (envblock))
+ if (disable_pcon || !ptys_primary->term_has_pcon_cap (envblock))
nopcon = true;
if (ptys_primary->setup_pseudoconsole (&si_pcon, nopcon))
{