Re: [PATCH] Cygwin: console, pty: Prevent error in legacy console mode.

2019-11-06 Thread Takashi Yano
On Wed, 6 Nov 2019 09:37:11 -0700 Brian Inglis wrote: > Is this not executed on every object creation and on every fork? No. It is executed only in the first console object. > If that is not the case, then legacy_console/() should be a singleton > object/method, constructed when accessed, or in w

Re: [PATCH] Cygwin: console, pty: Prevent error in legacy console mode.

2019-11-06 Thread Brian Inglis
On 2019-11-06 08:44, Takashi Yano wrote: > On Wed, 6 Nov 2019 08:06:55 -0700 > Brian Inglis wrote: >>> + if (con.is_legacy) >>> + setenv ("TERM", "cygwin", 1); >>> } >> >> handlers should not be changing user's env vars: that is the user's >> selection to >> get their preferred operati

[PATCH v3] Cygwin: console, pty: Prevent error in legacy console mode.

2019-11-06 Thread Takashi Yano
--- winsup/cygwin/environ.cc | 2 +- winsup/cygwin/fhandler.h | 1 + winsup/cygwin/fhandler_console.cc | 46 --- winsup/cygwin/fhandler_tty.cc | 14 ++ 4 files changed, 46 insertions(+), 17 deletions(-) diff --git a/winsup/cygwin/environ

Re: [PATCH] Cygwin: console, pty: Prevent error in legacy console mode.

2019-11-06 Thread Takashi Yano
On Wed, 6 Nov 2019 08:06:55 -0700 Brian Inglis wrote: > > + if (con.is_legacy) > > + setenv ("TERM", "cygwin", 1); > > } > > handlers should not be changing user's env vars: that is the user's selection > to > get their preferred operation in their apps. > > If you need to set TERM,

[PATCH v2] Cygwin: console, pty: Prevent error in legacy console mode.

2019-11-06 Thread Takashi Yano
--- winsup/cygwin/fhandler.h | 1 + winsup/cygwin/fhandler_console.cc | 45 --- winsup/cygwin/fhandler_tty.cc | 20 ++ 3 files changed, 50 insertions(+), 16 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index d5

Re: [PATCH] Cygwin: console, pty: Prevent error in legacy console mode.

2019-11-06 Thread Takashi Yano
Hi Corinna, On Wed, 6 Nov 2019 15:05:47 +0100 Corinna Vinschen wrote: > the patch is fine in general. Still, what I really like to see is a > descriptive log message, as well as a matching comment... > > On Nov 6 20:59, Takashi Yano wrote: > > @@ -3131,6 +3134,16 @@ fhandler_pty_master::setup_p

Re: [PATCH] Cygwin: console, pty: Prevent error in legacy console mode.

2019-11-06 Thread Brian Inglis
On 2019-11-06 04:59, Takashi Yano wrote: > --- > winsup/cygwin/fhandler.h | 1 + > winsup/cygwin/fhandler_console.cc | 45 --- > winsup/cygwin/fhandler_tty.cc | 13 + > 3 files changed, 43 insertions(+), 16 deletions(-) > > diff --git a/winsup/cyg

Re: [PATCH] Cygwin: pty: Change how to determine if running as service or not.

2019-11-06 Thread Corinna Vinschen
On Nov 6 21:08, Takashi Yano wrote: > --- > winsup/cygwin/fhandler_tty.cc | 17 +++-- > 1 file changed, 3 insertions(+), 14 deletions(-) > > diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc > index f87ac73f2..2b4ad6e58 100644 > --- a/winsup/cygwin/fhandler_t

Re: [PATCH] Cygwin: console, pty: Prevent error in legacy console mode.

2019-11-06 Thread Corinna Vinschen
Hi Takashi, the patch is fine in general. Still, what I really like to see is a descriptive log message, as well as a matching comment... On Nov 6 20:59, Takashi Yano wrote: > @@ -3131,6 +3134,16 @@ fhandler_pty_master::setup_pseudoconsole () >if (res != S_OK) > system_printf ("Cr

[PATCH] Cygwin: pty: Change how to determine if running as service or not.

2019-11-06 Thread Takashi Yano
--- winsup/cygwin/fhandler_tty.cc | 17 +++-- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index f87ac73f2..2b4ad6e58 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -3095,

[PATCH] Cygwin: console, pty: Prevent error in legacy console mode.

2019-11-06 Thread Takashi Yano
--- winsup/cygwin/fhandler.h | 1 + winsup/cygwin/fhandler_console.cc | 45 --- winsup/cygwin/fhandler_tty.cc | 13 + 3 files changed, 43 insertions(+), 16 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index d5aa573