Re: [PATCH 3/3] fhandler_pty_slave::setup_locale: respect charset == "UTF-8"

2020-09-08 Thread Corinna Vinschen
On Sep 8 18:45, Takashi Yano via Cygwin-patches wrote: > Hi Corinna, > > On Tue, 8 Sep 2020 10:40:34 +0200 > Corinna Vinschen wrote: > > On Sep 7 13:45, Takashi Yano via Cygwin-patches wrote: > > > On Mon, 7 Sep 2020 01:04:13 +0900 > > > > > Chages: > > > > > - If global locale is set, it takes

Re: [PATCH v2 2/3] Cygwin: path_conv::check: handle error from fhandler_process::exists

2020-09-08 Thread Corinna Vinschen
On Sep 8 15:05, Ken Brown via Cygwin-patches wrote: > On 9/8/2020 3:02 PM, Ken Brown via Cygwin-patches wrote: > > fhandler_process::exists is called when we are checking a path > > starting with "/proc//fd". If it returns virt_none and sets an > > errno, there is no need for further checking. J

Re: [PATCH 1/2] Cygwin: format_process_fd: add directory check

2020-09-08 Thread Corinna Vinschen
Hi Ken, On Sep 8 12:50, Ken Brown via Cygwin-patches wrote: > The incoming path is allowed to have the form "$PID/fd/[0-9]*/.*" > provided the descriptor symlink points to a directory. Check that > this is indeed the case. > --- > winsup/cygwin/fhandler_process.cc | 15 +++ > 1 file

Re: [PATCH v2 2/3] Cygwin: path_conv::check: handle error from fhandler_process::exists

2020-09-08 Thread Ken Brown via Cygwin-patches
On 9/8/2020 3:02 PM, Ken Brown via Cygwin-patches wrote: fhandler_process::exists is called when we are checking a path starting with "/proc//fd". If it returns virt_none and sets an errno, there is no need for further checking. Just set 'error' and return. --- winsup/cygwin/path.cc | 9 +

[PATCH v2 2/3] Cygwin: path_conv::check: handle error from fhandler_process::exists

2020-09-08 Thread Ken Brown via Cygwin-patches
fhandler_process::exists is called when we are checking a path starting with "/proc//fd". If it returns virt_none and sets an errno, there is no need for further checking. Just set 'error' and return. --- winsup/cygwin/path.cc | 9 + 1 file changed, 9 insertions(+) diff --git a/winsup/c

Re: [PATCH 2/2] Cygwin: path_conv::check: handle error from fhandler_process::exists

2020-09-08 Thread Ken Brown via Cygwin-patches
On 9/8/2020 12:50 PM, Ken Brown via Cygwin-patches wrote: fhandler_process::exists is called when we are checking a path starting with "/proc//fd". If it returns virt_none and sets an errno, there is no need for further checking. Just set 'error' and return. --- winsup/cygwin/path.cc | 6

Re: [PATCH] Cygwin: pty: Fix input charset for non-cygwin apps with disable_pcon.

2020-09-08 Thread Corinna Vinschen
Hi Takashi, On Sep 8 18:57, Takashi Yano via Cygwin-patches wrote: > - If the non-cygwin apps is executed under pseudo console disabled, > multibyte input for the apps are garbled. This patch fixes the > issue. > --- > winsup/cygwin/fhandler_tty.cc | 13 - > 1 file changed, 12 in

[PATCH 2/2] Cygwin: path_conv::check: handle error from fhandler_process::exists

2020-09-08 Thread Ken Brown via Cygwin-patches
fhandler_process::exists is called when we are checking a path starting with "/proc//fd". If it returns virt_none and sets an errno, there is no need for further checking. Just set 'error' and return. --- winsup/cygwin/path.cc | 6 ++ 1 file changed, 6 insertions(+) diff --git a/winsup/cygw

[PATCH 0/2] Fix problems with /proc//fd checking

2020-09-08 Thread Ken Brown via Cygwin-patches
This fixes the assertion failure reported here: https://sourceware.org/pipermail/cygwin/2020-September/246160.html with a simple test case here: https://sourceware.org/pipermail/cygwin/2020-September/246188.html That test case now fails as follows, as on Linux: $ ./proc_bug.exe open: Not a

[PATCH 1/2] Cygwin: format_process_fd: add directory check

2020-09-08 Thread Ken Brown via Cygwin-patches
The incoming path is allowed to have the form "$PID/fd/[0-9]*/.*" provided the descriptor symlink points to a directory. Check that this is indeed the case. --- winsup/cygwin/fhandler_process.cc | 15 +++ 1 file changed, 15 insertions(+) diff --git a/winsup/cygwin/fhandler_process.cc

[PATCH] Cygwin: pty: Fix input charset for non-cygwin apps with disable_pcon.

2020-09-08 Thread Takashi Yano via Cygwin-patches
- If the non-cygwin apps is executed under pseudo console disabled, multibyte input for the apps are garbled. This patch fixes the issue. --- winsup/cygwin/fhandler_tty.cc | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/c

Re: [PATCH 3/3] fhandler_pty_slave::setup_locale: respect charset == "UTF-8"

2020-09-08 Thread Takashi Yano via Cygwin-patches
Hi Corinna, On Tue, 8 Sep 2020 10:40:34 +0200 Corinna Vinschen wrote: > On Sep 7 13:45, Takashi Yano via Cygwin-patches wrote: > > On Mon, 7 Sep 2020 01:04:13 +0900 > > > > Chages: > > > > - If global locale is set, it takes precedence. > > > > > > Changes: > > > - Use __get_current_locale() ins

Re: [PATCH 3/3] fhandler_pty_slave::setup_locale: respect charset == "UTF-8"

2020-09-08 Thread Corinna Vinschen
On Sep 7 13:45, Takashi Yano via Cygwin-patches wrote: > On Mon, 7 Sep 2020 01:04:13 +0900 > > > Chages: > > > - If global locale is set, it takes precedence. > > > > Changes: > > - Use __get_current_locale() instead of __get_global_locale(). > > - Fix a bug for ISO-8859-* charset. > > Changes:

Re: [PATCH 3/3] fhandler_pty_slave::setup_locale: respect charset == "UTF-8"

2020-09-08 Thread Takashi Yano via Cygwin-patches
On Mon, 7 Sep 2020 23:17:36 +0200 (CEST) Johannes Schindelin wrote: > Hi Takashi, > > On Sat, 5 Sep 2020, Takashi Yano wrote: > > > On Fri, 4 Sep 2020 08:23:42 +0200 (CEST) > > Johannes Schindelin wrote: > > > > > > On Fri, 4 Sep 2020, Takashi Yano via Cygwin-patches wrote: > > > > > > > On Tue,

Re: [PATCH 3/3] fhandler_pty_slave::setup_locale: respect charset == "UTF-8"

2020-09-08 Thread Corinna Vinschen
On Sep 7 22:40, Takashi Yano via Cygwin-patches wrote: > Here is a summary of my points: > > [Senario 1] > 1) Start mintty (UTF-8). > 2) Start another mintty by > mintty -o charset=SJIS >from the first mintty. > > [Senario 2] > int pm = getpt(); > if (fork()) { > [do the master