Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Yano <takashi.yano@nifty.ne.jp>2020-01-21 16:25:13 +0300
committerCorinna Vinschen <corinna@vinschen.de>2020-01-22 12:56:10 +0300
commitcdf5db22f17b6f8e274168e3ff549f67d662bfb1 (patch)
tree8a07d62b527d895114634bceddcec193919843d1
parentda4ee7d60b9ff0bcdc081609a4467adb428d58e6 (diff)
Cygwin: pty: Introduce disable_pcon in environment CYGWIN.
- For programs which does not work properly with pseudo console, disable_pcon in environment CYGWIN is introduced. If disable_pcon is set, pseudo console support is disabled.
-rw-r--r--winsup/cygwin/environ.cc1
-rw-r--r--winsup/cygwin/fhandler_tty.cc2
-rw-r--r--winsup/cygwin/globals.cc1
-rw-r--r--winsup/doc/cygwinenv.xml6
4 files changed, 10 insertions, 0 deletions
diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc
index 8c5ce64e1..7eb4780a8 100644
--- a/winsup/cygwin/environ.cc
+++ b/winsup/cygwin/environ.cc
@@ -120,6 +120,7 @@ static struct parse_thing
{"reset_com", {&reset_com}, setbool, NULL, {{false}, {true}}},
{"wincmdln", {&wincmdln}, setbool, NULL, {{false}, {true}}},
{"winsymlinks", {func: set_winsymlinks}, isfunc, NULL, {{0}, {0}}},
+ {"disable_pcon", {&disable_pcon}, setbool, NULL, {{false}, {true}}},
{NULL, {0}, setdword, 0, {{0}, {0}}}
};
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index 50f03781c..1710f2520 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -3145,6 +3145,8 @@ is_running_as_service (void)
bool
fhandler_pty_master::setup_pseudoconsole ()
{
+ 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. */
diff --git a/winsup/cygwin/globals.cc b/winsup/cygwin/globals.cc
index ebe8b569f..a9648fe6a 100644
--- a/winsup/cygwin/globals.cc
+++ b/winsup/cygwin/globals.cc
@@ -71,6 +71,7 @@ bool pipe_byte;
bool reset_com;
bool wincmdln;
winsym_t allow_winsymlinks = WSYM_sysfile;
+bool disable_pcon;
bool NO_COPY in_forkee;
diff --git a/winsup/doc/cygwinenv.xml b/winsup/doc/cygwinenv.xml
index 6f67cb95d..67592cb7e 100644
--- a/winsup/doc/cygwinenv.xml
+++ b/winsup/doc/cygwinenv.xml
@@ -99,6 +99,12 @@ system call will immediately fail.</para>
<xref linkend="pathnames-symlinks"></xref>.</para>
</listitem>
+<listitem>
+<para><envar>disable_pcon</envar> - if set, pseudo console support in
+pty will be disabled. This is for programs which do not work properly
+under pty with pseudo console enabled. Defaults to not set.</para>
+</listitem>
+
</itemizedlist>
</sect2>