Re: [PATCH v2] Cygwin: pty: Revise code waiting for forwarding again.

2020-01-23 Thread Takashi Yano
On Thu, 23 Jan 2020 13:51:54 +0100 Corinna Vinschen wrote: > On Jan 23 13:30, Takashi Yano wrote: > > - After commit 6cc299f0e20e4b76f7dbab5ea8c296ffa4859b62, outputs of > > cygwin programs which call both printf() and WriteConsole() are > > frequently distorted. This

Re: [PATCH v2] Cygwin: pty: Revise code waiting for forwarding again.

2020-01-23 Thread Takashi Yano
On Thu, 23 Jan 2020 13:51:54 +0100 Corinna Vinschen wrote: > On Jan 23 13:30, Takashi Yano wrote: > > - After commit 6cc299f0e20e4b76f7dbab5ea8c296ffa4859b62, outputs of > > cygwin programs which call both printf() and WriteConsole() are > > frequently distorted. This

Re: [PATCH v2] Cygwin: pty: Revise code waiting for forwarding again.

2020-01-23 Thread Takashi Yano
On Thu, 23 Jan 2020 21:39:50 +0800 Koichi Murase wrote: > 0 [main] () shared_info::initialize: size of shared > memory region changed from 50104 to 49080 Is there any process alived using diffrent version of cygwin1.dll? -- Takashi Yano

Re: [PATCH] Cygwin: pty: Add missing console API hooks.

2020-01-23 Thread Takashi Yano
On Thu, 23 Jan 2020 13:48:13 +0100 Corinna Vinschen wrote: > On Jan 23 13:33, Takashi Yano wrote: > > - Following console APIs are additionally hooked for cygwin programs > > which directly call them. > > * FillConsoleOutputAttribute() > > *

[PATCH] Cygwin: pty: Remove close() call just before reopening slave.

2020-01-23 Thread Takashi Yano
- After commit da4ee7d60b9ff0bcdc081609a4467adb428d58e6, the issue reported in https://www.cygwin.com/ml/cygwin/2020-01/msg00209.html occurs. This patch fixes the issue. --- winsup/cygwin/fhandler_tty.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/

[PATCH] Cygwin: pty: Add missing console API hooks.

2020-01-22 Thread Takashi Yano
- Following console APIs are additionally hooked for cygwin programs which directly call them. * FillConsoleOutputAttribute() * FillConsoleOutputCharacterA() * FillConsoleOutputCharacterW() * ScrollConsoleScreenBufferA() * ScrollConsoleScreenBufferW() --- winsup/cygwin/fhandler_tty.cc

[PATCH v2] Cygwin: pty: Revise code waiting for forwarding again.

2020-01-22 Thread Takashi Yano
- After commit 6cc299f0e20e4b76f7dbab5ea8c296ffa4859b62, outputs of cygwin programs which call both printf() and WriteConsole() are frequently distorted. This patch reverts waiting function to dumb Sleep(). --- winsup/cygwin/fhandler_tty.cc | 30 +++--- winsup/cygwin/

[PATCH] Cygwin: pty: Revise code waiting for forwarding again.

2020-01-22 Thread Takashi Yano
- After commit 6cc299f0e20e4b76f7dbab5ea8c296ffa4859b62, outputs of cygwin programs which call both printf() and WriteConsole() are frequently distorted. This patch reverts waiting function to dumb Sleep(). --- winsup/cygwin/fhandler_tty.cc | 30 +++--- winsup/cygwin/

Re: [PATCH v2] Cygwin: pty: Revise code waiting for forwarding by master_fwd_thread.

2020-01-22 Thread Takashi Yano
On Thu, 23 Jan 2020 01:00:11 +0900 Takashi Yano wrote: > /* Test code */ > #include > #include > > int main() > { > DWORD n; > printf("\n"); > WriteConsole(GetStdHandle(STD_OUTPUT_HANDLE), "\r\n", 6, &n, 0); > re

Re: [PATCH v2] Cygwin: pty: Revise code waiting for forwarding by master_fwd_thread.

2020-01-22 Thread Takashi Yano
Hi Corinna, On Tue, 21 Jan 2020 10:37:35 +0100 Corinna Vinschen wrote: > On Jan 21 11:22, Takashi Yano wrote: > > - Though this rarely happens, sometimes the first printing of non- > > cygwin process does not displayed correctly. To fix this issue, > > the code for wait

[PATCH] Cygwin: pty: Fix reopening slave in push_to_pcon_screenbuffer().

2020-01-21 Thread Takashi Yano
- For programs compiled with -mwindows option, reopening slave is needed in push_to_pcon_screenbuffer(), however, it was not at appropriate place. This causes the problem reported in https://www.cygwin.com/ml/cygwin/2020-01/msg00161.html. This patch fixes the issue. --- winsup/cygwin/fhand

[PATCH v2] Cygwin: pty: Introduce disable_pcon in environment CYGWIN.

2020-01-21 Thread Takashi Yano
- 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. --- winsup/cygwin/environ.cc | 1 + winsup/cygwin/fhandler_tty.cc | 2 ++ winsup/cygwin/globals.cc | 1 + win

Re: [PATCH] Cygwin: pty: Introduce disable_pcon in environment CYGWIN.

2020-01-21 Thread Takashi Yano
On Mon, 20 Jan 2020 14:58:52 + Ken Brown wrote: > [Adding the cgdb maintainer to the CC.] > > On 1/20/2020 9:18 AM, Jon Turney wrote: > > On 20/01/2020 12:41, Takashi Yano wrote: > >> Hi Corinna, > >> > >> On Mon, 20 Jan 2020 11:06:46 +0100 > >

[PATCH v2] Cygwin: pty: Revise code waiting for forwarding by master_fwd_thread.

2020-01-20 Thread Takashi Yano
- Though this rarely happens, sometimes the first printing of non- cygwin process does not displayed correctly. To fix this issue, the code for waiting for forwarding by master_fwd_thread is revised. --- winsup/cygwin/fhandler_tty.cc | 15 +++ winsup/cygwin/tty.cc | 1 +

Re: [PATCH] Cygwin: pty: Revise code waiting for forwarding by master_fwd_thread.

2020-01-20 Thread Takashi Yano
er, more reliable indicator to see if forwarding will work? I have tried another implementation and confirmed it works as expected. -- Takashi Yano

Re: [PATCH] Cygwin: pty: Introduce disable_pcon in environment CYGWIN.

2020-01-20 Thread Takashi Yano
Hi Corinna, On Mon, 20 Jan 2020 11:06:46 +0100 Corinna Vinschen wrote: > On Jan 20 11:50, Takashi Yano wrote: > > - For programs which does not work properly with pseudo console, > > disable_pcon in environment CYGWIN is introduced. If disable_pcon > > is set, pseu

[PATCH] Cygwin: pty: Introduce disable_pcon in environment CYGWIN.

2020-01-19 Thread Takashi Yano
- 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. --- winsup/cygwin/environ.cc | 1 + winsup/cygwin/fhandler_tty.cc | 2 ++ winsup/cygwin/globals.cc | 1 + 3 f

[PATCH] Cygwin: pty: Revise code waiting for forwarding by master_fwd_thread.

2020-01-19 Thread Takashi Yano
- Though this rarely happens, sometimes the first printing of non- cygwin process does not displayed correctly. To fix this issue, the code for waiting for forwarding by master_fwd_thread is revised. --- winsup/cygwin/fhandler.h | 1 + winsup/cygwin/fhandler_tty.cc | 16 +---

[PATCH] Cygwin: pty: Fix state mismatch caused in octave gui.

2020-01-16 Thread Takashi Yano
- In octave gui, sometimes state mismatch between real pty state and state variable occurs. For example, this occurs when 'ls' command is executed in octave gui. This patch fixes the issue. --- winsup/cygwin/spawn.cc | 9 + 1 file changed, 9 insertions(+) diff --git a/winsup/cygwin/sp

[PATCH v2] Cygwin: pty: Fix the issue regarding open and close multiple PTYs.

2020-01-13 Thread Takashi Yano
- If two PTYs are opened in the same process and the first one is closed, the helper process for the first PTY remains running. This patch fixes the issue. --- winsup/cygwin/fhandler_tty.cc | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/fhand

Re: [PATCH] Cygwin: pty: Fix the issue regarding open and close multiple PTYs.

2020-01-13 Thread Takashi Yano
> parent with PROCESS_DUP_HANDLE? Thanks for the advice. I didn't know PROC_THREAD_ATTRIBUTE_HANDLE_LIST. It is very good idea to use PROC_THREAD_ATTRIBUTE_HANDLE_LIST. I will submit a revised patch. -- Takashi Yano

[PATCH v2] Cygwin: pty: Add missing CloseHandle() calls.

2020-01-13 Thread Takashi Yano
- PTY code which support pseudo console has a problem that causes handle leaks. Four of these are bug in pty code, and the other one seems to be a bug of Windows10. ClosePseudoConsole() fails to close one internal handle. This patch fixes the issue. --- winsup/cygwin/fhandler_tty.cc | 16 +++

[PATCH v2] Cygwin: console: Disable xterm mode for non cygwin process only.

2020-01-13 Thread Takashi Yano
- Special function keys such as arrow keys or function keys do not work in ConEmu with cygwin-connector after commit 6a06c6bc8f8492ea09aa3ae180fe94e4ac265611. This patch fixes the issue. --- winsup/cygwin/fhandler_console.cc | 19 --- winsup/cygwin/fhandler_tty.cc | 10 --

[PATCH v2] Cygwin: console: Add workaround for broken CSI3J in Win10 1809.

2020-01-13 Thread Takashi Yano
- In Win10 1809, the cursor position sometimes goes out of screen by clear command in console. This seems to be caused by escape sequence CSI3J (ESC[3J). This happens only for 1809. This patch is a workaround for the issue. --- winsup/cygwin/fhandler_console.cc | 12 + winsup/cygwin/

Re: [PATCH] Cygwin: console: Add code to restore console mode on close.

2020-01-13 Thread Takashi Yano
Hi Corinna, welcome back! On Mon, 13 Jan 2020 17:25:53 +0100 Corinna Vinschen wrote: > On Jan 2 22:17, Takashi Yano wrote: > > - The console with 24bit color support has a problem that console > > mode is changed if cygwin process is executed in cmd.exe which > > started

[PATCH] Cygwin: pty: Set console code page only if pseudo console is enabled.

2020-01-10 Thread Takashi Yano
- Input UTF-8 chars are garbled in ConEmu with cygwin connector if the environment does not support pseudo console. This patch fixes the issue. --- winsup/cygwin/fhandler_tty.cc | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/winsup/cygwin/fhandler_tt

[PATCH] Cygwin: pty: Disable FreeConsole() on close for non cygwin process.

2020-01-10 Thread Takashi Yano
- After commit e1a0775dc0545b5f9c81b09a327fc110c538b7b4, the problem reported in https://www.cygwin.com/ml/cygwin/2020-01/msg00093.html occurs. For Gnu scren and tmux, calling FreeConsole() on pty close is necessary. However, if FreeConsole() is called, cygwin setup with '-h' option does no

[PATCH] Cygwin: select: Speed up select() call for pty, pipe and fifo.

2020-01-06 Thread Takashi Yano
- The slowing down issue of X11 forwarding using ssh -Y, reported in https://www.cygwin.com/ml/cygwin/2019-12/msg00295.html, is due to the change of select() code for pty in the commit 915fcd0ae8d83546ce135131cd25bf6795d97966. cygthread::detach() takes at most about 10msec because Sleep() i

[PATCH] Cygwin: console: Make suspending process work properly.

2020-01-05 Thread Takashi Yano
- After commit f4b47827cf87f055687a0c52a3485d42b3e2b941, suspending process by Ctrl-Z does not work in console and results in hang up. This patch fixes the issue. --- winsup/cygwin/fhandler_console.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/winsup/cygwin/fhandler_console.cc b/wi

[PATCH] Cygwin: console: Add code to restore console mode on close.

2020-01-02 Thread Takashi Yano
- The console with 24bit color support has a problem that console mode is changed if cygwin process is executed in cmd.exe which started in cygwin shell. For example, cursor keys become not working if bash -> cmd -> true are executed in this order. This patch fixes the issue. --- winsup/cy

[PATCH] Cygwin: console: Add workaround for broken CSI3J in Win10 1809.

2019-12-31 Thread Takashi Yano
- In Win10 1809, the cursor position sometimes goes out of screen by clear command in console. This seems to be caused by escape sequence CSI3J (ESC[3J). This happens only for 1809. This patch is a workaround for the issue. --- winsup/cygwin/fhandler_console.cc | 12 + winsup/cygwin/

[PATCH] Cygwin: console: Disable xterm mode for non cygwin process only.

2019-12-31 Thread Takashi Yano
- Special function keys such as arrow keys or function keys do not work in ConEmu with cygwin-connector after commit 6a06c6bc8f8492ea09aa3ae180fe94e4ac265611. This patch fixes the issue. --- winsup/cygwin/fhandler_console.cc | 8 winsup/cygwin/spawn.cc| 29 +

[PATCH] Cygwin: pty: Revise the code for setting code page of pseudo console.

2019-12-31 Thread Takashi Yano
- Fix the problem which overrides the code page setting, reported in https://www.cygwin.com/ml/cygwin/2019-12/msg00292.html. --- winsup/cygwin/fhandler_tty.cc | 52 +-- 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b

[PATCH] Cygwin: pty: Remove destructor for fhandler_pty_master class.

2019-12-31 Thread Takashi Yano
- The destructor for fhandler_pty_master class does not seem to be necessary anymore. Therefore, it has been removed. --- winsup/cygwin/fhandler.h | 1 - winsup/cygwin/fhandler_tty.cc | 9 - 2 files changed, 10 deletions(-) diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhan

[PATCH] Cygwin: pty: Fix the issue regarding open and close multiple PTYs.

2019-12-31 Thread Takashi Yano
- If two PTYs are opened in the same process and the first one is closed, the helper process for the first PTY remains running. This patch fixes the issue. --- winsup/cygwin/fhandler_tty.cc | 8 winsup/utils/cygwin-console-helper.cc | 15 ++- 2 files changed, 18 i

[PATCH] Cygwin: pty: Add missing CloseHandle() calls.

2019-12-31 Thread Takashi Yano
--- winsup/cygwin/fhandler_tty.cc | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 65b12fd6c..23156f977 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -

Re: [PATCH] Cygwin: pty: Fix ESC[?3h and ESC[?3l handling again.

2019-12-20 Thread Takashi Yano
ed char* > p0" or > "isdigit((unsigned char)(*p0))", generally. Thanks for the advice. In general, you are right. However, in cygwin, ALLOW_NEGATIVE_CTYPE_INDEX is defined in ctype library in newlib, and the lookup table is extended in the negative direction. So, in terms of results, the code works as expected. -- Takashi Yano

[PATCH] Cygwin: pty: Fix ESC[?3h and ESC[?3l handling again.

2019-12-19 Thread Takashi Yano
- Even with commit fe512b2b12a2cea8393d14f038dc3914b1bf3f60, pty still has a problem in ESC[?3h and ESC[?3l handling if invalid sequence such as ESC[?$ is sent. This patch fixes the issue. --- winsup/cygwin/fhandler_tty.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win

[PATCH] Cygwin: pty: Fix a bug regarding ESC[?3h and ESC[?3l handling.

2019-12-18 Thread Takashi Yano
- Midnight commander (mc) does not work after the commit 1626569222066ee601f6c41b29efcc95202674b7 as reported in https://www.cygwin.com/ml/cygwin/2019-12/msg00173.html. This patch fixes the issue. --- winsup/cygwin/fhandler_tty.cc | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-)

[PATCH] Cygwin: pty: Convert CamelCase names to snake_case names.

2019-11-15 Thread Takashi Yano
--- winsup/cygwin/dtable.cc | 6 +-- winsup/cygwin/fhandler.h | 8 ++-- winsup/cygwin/fhandler_console.cc | 2 +- winsup/cygwin/fhandler_tty.cc | 68 +++ winsup/cygwin/fork.cc | 8 ++-- winsup/cygwin/spawn.cc| 18 --

Re: [PATCH] Cygwin: pty: Trigger redraw screen if ESC[?3h or ESC[?3l is sent.

2019-11-14 Thread Takashi Yano
eal screen with the console screen buffer in spite that they are already synchronized, but there should be no side effects. -- Takashi Yano

[PATCH] Cygwin: pty: Trigger redraw screen if ESC[?3h or ESC[?3l is sent.

2019-11-13 Thread Takashi Yano
- Pseudo console clears console screen buffer if ESC[?3h or ESC[?3l is sent. However, xterm/vt100 does not clear screen. This cause mismatch between real screen and console screen buffer. Therefore, this patch triggers redraw screen in that situation so that the synchronization is done on t

Re: [PATCH] Cygwin: pty: Use redraw screen instead of clear screen.

2019-11-13 Thread Takashi Yano
On Wed, 13 Nov 2019 10:18:35 +0100 Corinna Vinschen wrote: > On Nov 12 22:00, Takashi Yano wrote: > > - Previously, pty cleared screen at startup for synchronization > > between the real screen and console screen buffer for pseudo > > console. With this patch, instead of

[PATCH] Cygwin: console: Revise the code checking if the console is legacy.

2019-11-12 Thread Takashi Yano
- Accessing shared_console_info before initializing causes access violation in checking if the console is legacy mode. This patch fixes this issue. This solves the problem reported in: https://www.cygwin.com/ml/cygwin-patches/2019-q4/msg00099.html --- winsup/cygwin/fhandler_console.cc | 29 +

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

2019-11-12 Thread Takashi Yano
On Tue, 12 Nov 2019 13:46:04 + Ken Brown wrote: > On 11/11/2019 9:55 PM, Takashi Yano wrote: > > Hi Ken, > > > > On Mon, 11 Nov 2019 19:39:46 + > > Ken Brown wrote: > >> After this commit, the XWin Server Start Menu shortcut no longer works. I &g

[PATCH] Cygwin: pty: Use redraw screen instead of clear screen.

2019-11-12 Thread Takashi Yano
- Previously, pty cleared screen at startup for synchronization between the real screen and console screen buffer for pseudo console. With this patch, instead of clearing screen, the screen is redrawn when the first native program is executed after pty is created. In other words, synchroniz

Re: [PATCH] Cygwin: pty: Disable clear screen for ssh sessions with -t option.

2019-11-12 Thread Takashi Yano
ond that! Thanks for testing. I will submit this patch since you like it. -- Takashi Yano

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

2019-11-11 Thread Takashi Yano
ached patch solves the issue? -- Takashi Yano revise-check-con-is-legacy.patch Description: Binary data

Re: [PATCH] Cygwin: pty: Disable clear screen for ssh sessions with -t option.

2019-11-08 Thread Takashi Yano
Hi Corinna, On Fri, 8 Nov 2019 12:09:55 +0100 Corinna Vinschen wrote: > On Oct 24 15:33, Corinna Vinschen wrote: > > On Oct 24 19:17, Takashi Yano wrote: > > > On Thu, 24 Oct 2019 11:38:17 +0200 > > > Corinna Vinschen wrote: > > > > Well, what I see whe

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

2019-11-08 Thread Takashi Yano
sage" mean git commit message? I misundersood that it meant strace log message. Sorry. -- Takashi Yano

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

2019-11-06 Thread Takashi Yano
by return value of SetConsoleMode(). This needs handle to console. Therefore, the check can not be done in wincap. I revised the code so that TERM is set only if it was not set when cygwin was started. Please look at v3 patch. -- Takashi Yano

[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
able console legacy mode. 2) Open command prompt. 3) set TERM 4) start cygwin What situation do you assume this causes problem? -- Takashi Yano

[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 @@ f

[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

Re: [PATCH] Cygwin: pty: Disable clear screen for ssh sessions with -t option.

2019-10-24 Thread Takashi Yano
e advice. Now I have confirmed the following code works as expected. inline static bool is_running_as_service (void) { return check_token_membership (well_known_service_sid) || RtlEqualSid (well_known_system_sid, cygheap->user.saved_sid ()); } -- Takashi Yano

Re: [PATCH] Cygwin: pty: Disable clear screen for ssh sessions with -t option.

2019-10-23 Thread Takashi Yano
(Authenticated Users) S-1-16-16384 (Mandatory System Integrity) In this case, S-1-16-16384 does not have SE_GROUP_ENABLED flag, so check_token_membership() can not be used. -- Takashi Yano

Re: [PATCH] Cygwin: pty: Disable clear screen for ssh sessions with -t option.

2019-10-22 Thread Takashi Yano
On Tue, 22 Oct 2019 15:40:48 +0200 Corinna Vinschen wrote: > Am I doing something wrong? This code crashes mintty on my > installation. At start, a string of "6n6n6n6n..." appears and then > mintty exits. I cannot reproduce that How about this one? -- Takashi Yano

Re: [PATCH] Cygwin: pty: Disable clear screen for ssh sessions with -t option.

2019-10-22 Thread Takashi Yano
On Tue, 22 Oct 2019 10:02:42 +0200 Corinna Vinschen wrote: > On Oct 22 16:23, Takashi Yano wrote: > > On Tue, 22 Oct 2019 08:55:06 +0200 > > Corinna Vinschen wrote: > > > On Oct 22 09:09, Takashi Yano wrote: > > > > I confirmed the dwSize has right screen size

Re: [PATCH] Cygwin: pty: Disable clear screen for ssh sessions with -t option.

2019-10-22 Thread Takashi Yano
On Tue, 22 Oct 2019 09:09:30 +0900 Takashi Yano wrote: > On Mon, 21 Oct 2019 11:43:56 +0200 > Corinna Vinschen wrote: > > The (admittedly vague) idea is, maybe cmd.exe can be cheated into > > not changing the console buffer by changing it to what it expects > > right a

Re: [PATCH] Cygwin: pty: Disable clear screen for ssh sessions with -t option.

2019-10-22 Thread Takashi Yano
On Tue, 22 Oct 2019 08:55:06 +0200 Corinna Vinschen wrote: > On Oct 22 09:09, Takashi Yano wrote: > > I confirmed the dwSize has right screen size and dwCursorPosition > > is (0,0) just after creating pty even though the cursor position > > in real screen is not at top le

Re: [PATCH] Cygwin: pty: Disable clear screen for ssh sessions with -t option.

2019-10-21 Thread Takashi Yano
console is started. The console screen buffer is empty just after creating pseudo console, therefore, clearing screen is the simplest way to match the real screen with the console screen buffer. -- Takashi Yano

Re: [PATCH] Cygwin: pty: Disable clear screen for ssh sessions with -t option.

2019-10-21 Thread Takashi Yano
On Mon, 21 Oct 2019 19:55:15 +0900 Takashi Yano wrote: > netsh is even worse. The cursor position will be broken by the follwing > steps. > 1) env TERM=dumb script > 2) netsh > 3) winhttp show proxy wmic also has the cursor position problem. 1) env TERM=dumb script 2) /cyg

Re: [PATCH] Cygwin: pty: Disable clear screen for ssh sessions with -t option.

2019-10-21 Thread Takashi Yano
is not so strange, I suppose. -- Takashi Yano

[PATCH v2] Cygwin: pty: Disable clear screen for ssh sessions with -t option.

2019-10-18 Thread Takashi Yano
--- winsup/cygwin/fhandler_tty.cc | 67 ++- winsup/cygwin/tty.cc | 1 + winsup/cygwin/tty.h | 1 + 3 files changed, 44 insertions(+), 25 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index da6119dfb..d8

Re: [PATCH] Cygwin: pty: Disable clear screen for ssh sessions with -t option.

2019-10-18 Thread Takashi Yano
clear screen is not done. 1) Execute ls or ps to draw something to screen. 2) env TERM=dumb script 3) Execute cmd.exe. If we can accept this behaviour, clear screen is not necessary. -- Takashi Yano

[PATCH] Cygwin: pty: Disable clear screen for ssh sessions with -t option.

2019-10-18 Thread Takashi Yano
--- winsup/cygwin/fhandler_tty.cc | 21 - winsup/cygwin/tty.cc | 1 + winsup/cygwin/tty.h | 1 + 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index da6119dfb..163f93f35 100644 -

Re: [PATCH] Cygwin: pty: Change the timing of clear screen.

2019-10-18 Thread Takashi Yano
. So, please call me Takashi as always. -- Takashi Yano

[PATCH] Cygwin: pty: Change the timing of clear screen.

2019-10-16 Thread Takashi Yano
--- winsup/cygwin/fhandler_tty.cc | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 1095c82eb..baf3c9794 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc

[PATCH] Cygwin: pty: Avoid detach console in the process running as service.

2019-10-16 Thread Takashi Yano
--- winsup/cygwin/fhandler_tty.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index baf3c9794..da6119dfb 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -1048,6 +1048,8 @@ fhandler_pty_slave::

[PATCH] Cygwin: Fix signal handling issue introduced by PTY related change.

2019-10-03 Thread Takashi Yano
- After commit 41864091014b63b0cb72ae98281fa53349b6ef77, there is a regression in signal handling reported in https://www.cygwin.com/ml/cygwin/2019-10/msg00010.html. This patch fixes the issue. --- winsup/cygwin/exceptions.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] Cygwin: pty: Fix PTY so that cygwin setup shows help with -h option.

2019-09-26 Thread Takashi Yano
- After commit 169d65a5774acc76ce3f3feeedcbae7405aa9b57, cygwin setup fails to show help message when -h option is specified, as reported in https://cygwin.com/ml/cygwin/2019-09/msg00248.html. This patch fixes the problem. --- winsup/cygwin/spawn.cc | 4 ++-- 1 file changed, 2 insertions(+),

Re: [ANNOUNCEMENT] cygwin 3.1.0-0.5 (TEST)

2019-09-21 Thread Takashi Yano
rs > unless you tell me that you'd like me to wait for further patches. I currently do not have any patch planning. Please go ahead. -- Takashi Yano

[PATCH v2 1/1] Cygwin: console: Make console input work in GDB and strace.

2019-09-20 Thread Takashi Yano
- After commit 2232498c712acc97a38fdc297cbe53ba74d0ec2c, console input cause error in GDB or strace. This patch fixes this issue. --- winsup/cygwin/pinfo.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index ffd4c8cd9..35c1ff

[PATCH v2 0/1] Cygwin: console: Make console input work in GDB and strace.

2019-09-20 Thread Takashi Yano
- After commit 2232498c712acc97a38fdc297cbe53ba74d0ec2c, console input cause error in GDB or strace. This patch fixes this issue. v2: Patch pinfo.cc rather than fhandler_termios.cc. This probably is the right thing. Takashi Yano (1): Cygwin: console: Make console input work in GDB and strace

[PATCH v2 1/1] Cygwin: Fix incorrect TTY for non-cygwin process.

2019-09-19 Thread Takashi Yano
- After commit d4045fdbef60d8e7e0d11dfe38b048ea2cb8708b, the TTY displayed by ps command is incorrect if the process is non-cygwin process. This patch fixes this issue. --- winsup/cygwin/exceptions.cc | 2 +- winsup/cygwin/spawn.cc | 5 + 2 files changed, 2 insertions(+), 5 deletions(

[PATCH v2 0/1] Cygwin: Fix incorrect TTY for non-cygwin process.

2019-09-19 Thread Takashi Yano
- After commit d4045fdbef60d8e7e0d11dfe38b048ea2cb8708b, the TTY displayed by ps command is incorrect if the process is non-cygwin process. This patch fixes this issue. v2: Simplify the condition to call proc_subproc (PROC_CLEARWAIT, 1) in exceptions.cc. Takashi Yano (1): Cygwin: Fix

[PATCH] Cygwin: Fix incorrect TTY for non-cygwin process.

2019-09-19 Thread Takashi Yano
- After commit d4045fdbef60d8e7e0d11dfe38b048ea2cb8708b, the TTY displayed by ps command is incorrect if the process is non-cygwin process. This patch fixes this issue. --- winsup/cygwin/exceptions.cc | 2 +- winsup/cygwin/spawn.cc | 5 + 2 files changed, 2 insertions(+), 5 deletions(

Re: [PATCH v2 1/1] Cygwin: console: Revive Win7 compatibility.

2019-09-19 Thread Takashi Yano
t even with the buffer whose depth is 2048. -- Takashi Yano

[PATCH v2 1/1] Cygwin: console: Revive Win7 compatibility.

2019-09-18 Thread Takashi Yano
- The commit fca4cda7a420d7b15ac217d008527e029d05758e broke Win7 compatibility. This patch fixes the issue. --- winsup/cygwin/fhandler.h | 6 ++ winsup/cygwin/fhandler_console.cc | 6 -- winsup/cygwin/select.cc | 1 - 3 files changed, 6 insertions(+), 7 deletions(-) d

Re: [PATCH] Cygwin: console: Revive Win7 compatibility.

2019-09-18 Thread Takashi Yano
On Wed, 18 Sep 2019 18:21:49 +0200 Achim Gratz wrote: > Takashi Yano writes: > > - The commit fca4cda7a420d7b15ac217d008527e029d05758e broke Win7 > > compatibility. This patch fixes the issue. > > --- > > winsup/cygwin/fhandler_console.cc | 10 +- &

[PATCH v2 0/1] Cygwin: console: Revive Win7 compatibility.

2019-09-18 Thread Takashi Yano
- The commit fca4cda7a420d7b15ac217d008527e029d05758e broke Win7 compatibility. This patch fixes the issue. v2: Move definition of INREC_SIZE into fhandler.h from fhandler_console.cc and select.cc. Takashi Yano (1): Cygwin: console: Revive Win7 compatibility. winsup/cygwin/fhandler.h

[PATCH 4/5] Cygwin: pty: Add charset conversion for console apps in legacy PTY.

2019-09-18 Thread Takashi Yano
--- winsup/cygwin/fhandler_tty.cc | 7 +++ 1 file changed, 7 insertions(+) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index f723ec7cf..2a92e44cf 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -3054,6 +3054,12 @@ fhandler_pty_m

[PATCH 3/5] Cygwin: pty: Unify the charset conversion codes into a function.

2019-09-18 Thread Takashi Yano
--- winsup/cygwin/fhandler_tty.cc | 130 +- 1 file changed, 49 insertions(+), 81 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 843807aab..f723ec7cf 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandl

[PATCH] Cygwin: console: Make console input work in GDB and strace.

2019-09-18 Thread Takashi Yano
- After commit 2232498c712acc97a38fdc297cbe53ba74d0ec2c, console input cause error in GDB or strace. This patch fixes this issue. --- winsup/cygwin/fhandler_termios.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/fhandler_termios.cc b/winsup/cygwin/fhandle

[PATCH 0/5] Some fixes for PTY with pseudo console support (4)

2019-09-18 Thread Takashi Yano
Takashi Yano (5): Cygwin: pty: Avoid potential segfault in PTY code when ppid = 1. Cygwin: pty: Make GDB work again on pty. Cygwin: pty: Unify the charset conversion codes into a function. Cygwin: pty: Add charset conversion for console apps in legacy PTY. Cygwin: pty: Add missing guard

[PATCH 1/5] Cygwin: pty: Avoid potential segfault in PTY code when ppid = 1.

2019-09-18 Thread Takashi Yano
--- winsup/cygwin/fhandler_tty.cc | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 659e7b595..2a1c34f7d 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -137,9 +137,1

[PATCH 5/5] Cygwin: pty: Add missing guard when PTY is in the legacy mode.

2019-09-18 Thread Takashi Yano
--- winsup/cygwin/fhandler_tty.cc | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 2a92e44cf..1095c82eb 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -87,7 +87,8 @@ set_sw

[PATCH 2/5] Cygwin: pty: Make GDB work again on pty.

2019-09-18 Thread Takashi Yano
--- winsup/cygwin/fhandler_tty.cc | 35 +++ 1 file changed, 35 insertions(+) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 2a1c34f7d..843807aab 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -197

[PATCH] Cygwin: console: Revive Win7 compatibility.

2019-09-18 Thread Takashi Yano
- The commit fca4cda7a420d7b15ac217d008527e029d05758e broke Win7 compatibility. This patch fixes the issue. --- winsup/cygwin/fhandler_console.cc | 10 +- winsup/cygwin/select.cc | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/winsup/cygwin/fhandler_cons

[PATCH] Cygwin: pty: Use autoload feature for pseudo console system calls.

2019-09-15 Thread Takashi Yano
- The autoload feature is used rather than GetModuleHandle(), GetProcAddress() for CreatePseudoConsole(), ResizePseudoConsole() and ClosePseudoConsole(). --- winsup/cygwin/autoload.cc | 3 +++ winsup/cygwin/fhandler_tty.cc | 36 +-- 2 files changed, 16 inse

[PATCH] Cygwin: pty: Correct typos that do not fit the coding style.

2019-09-14 Thread Takashi Yano
--- winsup/cygwin/fhandler_tty.cc | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 5c27510be..5072c6243 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc

Re: [PATCH v3 0/1] Cygwin: pty: Fix the behaviour of Ctrl-C in the pseudo console mode.

2019-09-14 Thread Takashi Yano
nal fixes have been settled with these patches, so I think it is ready to issue a new test release. -- Takashi Yano

[PATCH 1/3] Cygwin: pty: Fix bad file descriptor error in some environment.

2019-09-14 Thread Takashi Yano
- The bad file descriptor problem reported in: https://cygwin.com/ml/cygwin-patches/2019-q3/msg00104.html was recurring. Fixed again. --- winsup/cygwin/fhandler_tty.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 9aa83

[PATCH 0/3] Some fixes for PTY with pseudo console support (3)

2019-09-14 Thread Takashi Yano
_exec() because it seems not too early even at this timing. Takashi Yano (3): Cygwin: pty: Fix bad file descriptor error in some environment. Cygwin: pty: Use system NLS function instead of PTY's own one. Cygwin: pty: Change the timing of clearing screen. winsup/cygwin/fhandler.h | 1

[PATCH 2/3] Cygwin: pty: Use system NLS function instead of PTY's own one.

2019-09-14 Thread Takashi Yano
- Since calling system __loadlocale() caused execution error, PTY used its own NLS function. The cause of the error has been found, the corresponding code has been rewritten using system function. --- winsup/cygwin/fhandler.h | 1 + winsup/cygwin/fhandler_tty.cc | 499 +++-

[PATCH 3/3] Cygwin: pty: Change the timing of clearing screen.

2019-09-14 Thread Takashi Yano
- The code which clears screen is moved from reset_switch_to_pcon() to fixup_after_exec() because it seems not too early even at this timing. --- winsup/cygwin/fhandler_tty.cc | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/winsup/cygwin/fhandle

Re: [PATCH v3 0/1] Cygwin: pty: Fix the behaviour of Ctrl-C in the pseudo console mode.

2019-09-13 Thread Takashi Yano
pty: Switch input and output pipes individually. [PATCH 0/1] Cygwin: console: Fix read() in non-canonical mode. Could you please review them? -- Takashi Yano

<    3   4   5   6   7   8   9   10   >