Re: [PATCH 2/2] Cygwin: pty: Disable clear screen on new pty if TERM=dumb or emacs*.

2019-09-03 Thread Takashi Yano
On Wed, 4 Sep 2019 12:34:31 +0900 Takashi Yano wrote: > Attached is the raw output from pseudo console when the screen shows > the simple text below. > > from here > [yano@Express5800-S70 ~]$ cmd > Microsoft Windows [Version 10.0.18362.329] > (c) 2019 Microsoft Corporation. All rights

Re: [PATCH 2/2] Cygwin: pty: Disable clear screen on new pty if TERM=dumb or emacs*.

2019-09-03 Thread Takashi Yano
Hi Brian, On Tue, 3 Sep 2019 20:47:14 -0600 Brian Inglis wrote: > On 2019-09-03 19:46, Takashi Yano wrote: > > - Pseudo console support introduced by commit > > 169d65a5774acc76ce3f3feeedcbae7405aa9b57 shows garbage ^[[H^[[J in > > some of emacs screens. These screens do not handle ANSI

Re: [PATCH 2/2] Cygwin: pty: Disable clear screen on new pty if TERM=dumb or emacs*.

2019-09-03 Thread Brian Inglis
On 2019-09-03 19:46, Takashi Yano wrote: > - Pseudo console support introduced by commit > 169d65a5774acc76ce3f3feeedcbae7405aa9b57 shows garbage ^[[H^[[J in > some of emacs screens. These screens do not handle ANSI escape > sequences. Therefore, clear screen is disabled on these screens.

Re: [PATCH v4 1/1] Cygwin: pty: Fix state management for pseudo console support.

2019-09-03 Thread Takashi Yano
Hi Corinna, I have posted several patches for PTY with pseudo console support. Please apply them in the following order. [PATCH 1/4] Cygwin: pty: Code cleanup - Cleanup the code which is commented out by #if 0 regarding pseudo console. - Remove #if 1 for experimental code which seems to be

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

2019-09-03 Thread Takashi Yano
[PATCH 1/2] Cygwin: pty: Add a workaround for ^C handling. - Pseudo console support introduced by commit 169d65a5774acc76ce3f3feeedcbae7405aa9b57 sometimes cause random crash or freeze by pressing ^C while cygwin and non-cygwin processes are executed simultaneously in the same pty. This

[PATCH 1/2] Cygwin: pty: Add a workaround for ^C handling.

2019-09-03 Thread Takashi Yano
- Pseudo console support introduced by commit 169d65a5774acc76ce3f3feeedcbae7405aa9b57 sometimes cause random crash or freeze by pressing ^C while cygwin and non-cygwin processes are executed simultaneously in the same pty. This patch is a workaround for this issue. ---

[PATCH 2/2] Cygwin: pty: Disable clear screen on new pty if TERM=dumb or emacs*.

2019-09-03 Thread Takashi Yano
- Pseudo console support introduced by commit 169d65a5774acc76ce3f3feeedcbae7405aa9b57 shows garbage ^[[H^[[J in some of emacs screens. These screens do not handle ANSI escape sequences. Therefore, clear screen is disabled on these screens. --- winsup/cygwin/fhandler_tty.cc | 26

[PATCH v5 1/1] Cygwin: pty: Fix state management for pseudo console support.

2019-09-03 Thread Takashi Yano
- Pseudo console support introduced by commit 169d65a5774acc76ce3f3feeedcbae7405aa9b57 has some bugs which cause mismatch between state variables and real pseudo console state regarding console attaching and r/w pipe switching. This patch fixes this issue by redesigning the state

[PATCH v5 0/1] Fix PTY state management in pseudo console support.

2019-09-03 Thread Takashi Yano
Pseudo console support in test release TEST: Cygwin 3.1.0-0.3, introduced by commit 169d65a5774acc76ce3f3feeedcbae7405aa9b57, has some bugs which cause mismatch between state variables and real pseudo console state regarding console attaching and r/w pipe switching. This patch fixes this issue by

[PATCH 4/4] Cygwin: pty: Limit API hook to the program linked with the APIs.

2019-09-03 Thread Takashi Yano
- API hook used for pseudo console support causes slow down. This patch limits API hook to only program which is linked with the corresponding APIs. Normal cygwin program is not linked with such APIs (such as WriteFile, etc...) directly, therefore, no slow down occurs. However, console

[PATCH 3/4] Cygwin: pty: Move function hook_api() into hookapi.cc.

2019-09-03 Thread Takashi Yano
- PTY uses Win32 API hook for pseudo console suppot. The function hook_api() is used for this purpose and defined in fhandler_tty.cc previously. This patch moves it into hookapi.cc. --- winsup/cygwin/fhandler_tty.cc | 44 --- winsup/cygwin/hookapi.cc | 34

[PATCH 1/4] Cygwin: pty: Code cleanup

2019-09-03 Thread Takashi Yano
- Cleanup the code which is commented out by #if 0 regarding pseudo console. - Remove #if 1 for experimental code which seems to be stable. --- winsup/cygwin/fhandler_tty.cc | 28 1 file changed, 28 deletions(-) diff --git a/winsup/cygwin/fhandler_tty.cc

[PATCH 2/4] Cygwin: pty: Speed up a little hooked Win32 API for pseudo console.

2019-09-03 Thread Takashi Yano
- Some Win32 APIs are hooked in pty code for pseudo console support. This causes slow down. This patch improves speed a little. --- winsup/cygwin/fhandler_tty.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc

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

2019-09-03 Thread Takashi Yano
[PATCH 1/4] Cygwin: pty: Code cleanup - Cleanup the code which is commented out by #if 0 regarding pseudo console. - Remove #if 1 for experimental code which seems to be stable. [PATCH 2/4] Cygwin: pty: Speed up a little hooked Win32 API for pseudo console. - Some Win32 APIs are hooked in pty

Re: [PATCH v4 1/1] Cygwin: pty: Fix state management for pseudo console support.

2019-09-03 Thread Corinna Vinschen
Hi Takashi, On Sep 3 12:05, Takashi Yano wrote: > > > - Sleep (60); /* Wait for pty_master_fwd_thread() */ > > > + Sleep (20); /* Wait for pty_master_fwd_thread() */ > > > > Isn't that a separate issue as well? A separate patch may be in order > > here, kind of like "Cygwin: pseudo