[PATCH 0/1] Cygwin: pty: Switch input and output pipes individually.

2019-09-13 Thread Takashi Yano
such behaviour. Takashi Yano (1): Cygwin: pty: Switch input and output pipes individually. winsup/cygwin/dtable.cc | 6 +- winsup/cygwin/fhandler.h | 9 +- winsup/cygwin/fhandler_console.cc | 7 +- winsup/cygwin/fhandler_tty.cc | 256 -- winsup

[PATCH 1/1] Cygwin: pty: Switch input and output pipes individually.

2019-09-13 Thread Takashi Yano
- Previously, input and output pipes were switched together between the traditional pty and the pseudo console. However, for example, if stdin is redirected to another device, it is better to leave input pipe traditional pty side even for non-cygwin program. This patch realizes such

[PATCH 1/1] Cygwin: console: Fix read() in non-canonical mode.

2019-09-13 Thread Takashi Yano
- In non-canonical mode, cygwin console returned only one character even if several keys are typed before read() called. This patch fixes this behaviour. --- winsup/cygwin/fhandler_console.cc | 606 -- 1 file changed, 315 insertions(+), 291 deletions(-) diff --git

[PATCH 0/1] Cygwin: console: Fix read() in non-canonical mode.

2019-09-13 Thread Takashi Yano
- In non-canonical mode, cygwin console returned only one character even if several keys are typed before read() called. This patch fixes this behaviour. Takashi Yano (1): Cygwin: console: Fix read() in non-canonical mode. winsup/cygwin/fhandler_console.cc | 606

[PATCH v2 1/1] Cygwin: pty: Switch input and output pipes individually.

2019-09-13 Thread Takashi Yano
- Previously, input and output pipes were switched together between the traditional pty and the pseudo console. However, for example, if stdin is redirected to another device, it is better to leave input pipe traditional pty side even for non-cygwin program. This patch realizes such

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

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

[PATCH 0/1] Cygwin: pty: Fix screen alternation while pseudo console switching.

2019-09-08 Thread Takashi Yano
this issue. Takashi Yano (1): Cygwin: pty: Fix screen alternation while pseudo console switching. winsup/cygwin/fhandler_tty.cc | 22 ++ 1 file changed, 14 insertions(+), 8 deletions(-) -- 2.21.0

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

2019-09-08 Thread Takashi Yano
. This patch fixes these issues. v5: Add a workaround for piped non-cygwin program. v4: Fix the problem 1 and 2 reported in https://cygwin.com/ml/cygwin-patches/2019-q3/msg00175.html v3: Fix mistake in v2. v2: Remove the code which accidentally clears ENABLE_ECHO_INPUT flag. Takashi Yano (1): Cygwin

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

2019-09-08 Thread Takashi Yano
- When the I/O pipe is switched to the pseudo console side, the behaviour of Ctrl-C was unstable. This rarely happens, however, for example, shell sometimes crashes by Ctrl-C in that situation. Furthermore, Ctrl-C was ignored if output of non-cygwin program is redirected to pipe. This

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

2019-09-08 Thread Takashi Yano
Sorry, revised again. Please apply v5 patch. On Sat, 7 Sep 2019 14:39:24 +0900 Takashi Yano wrote: > - When the I/O pipe is switched to the pseudo console side, the > behaviour of Ctrl-C is unstable. This rarely happens, however, > for example, shell sometimes crashes

[PATCH 1/1] Cygwin: pty: Fix screen alternation while pseudo console switching.

2019-09-08 Thread Takashi Yano
- If screen alternated while pseudo console switching, it sometimes failed. This might happen when the output of the non-cygwin program is piped to less. This patch fixes this issue. --- winsup/cygwin/fhandler_tty.cc | 22 ++ 1 file changed, 14 insertions(+), 8

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

2019-09-05 Thread Takashi Yano
On Wed, 4 Sep 2019 21:36:28 -0600 Brian Inglis wrote: > So how do you tell the pseudo-console to generate only text not escape > sequences > the recipient may not be prepared to deal with? Unfortunately, no idea. -- Takashi Yano

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

2019-09-06 Thread Takashi Yano
This has small problem. Please apply v2. On Fri, 6 Sep 2019 21:48:15 +0900 Takashi Yano wrote: > - When the I/O pipe is switched to the pseudo console side, the > behaviour of Ctrl-C is unstable. This rarely happens, however, > for example, shell sometimes crashes

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

2019-09-06 Thread Takashi Yano
. Takashi Yano (1): Cygwin: pty: Fix the behaviour of Ctrl-C in the pseudo console mode. winsup/cygwin/fhandler.h | 4 +- winsup/cygwin/fhandler_tty.cc | 32 + winsup/cygwin/select.cc | 2 +- winsup/cygwin/spawn.cc| 128 +- 4 files

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

2019-09-06 Thread Takashi Yano
- When the I/O pipe is switched to the pseudo console side, the behaviour of Ctrl-C is unstable. This rarely happens, however, for example, shell sometimes crashes by Ctrl-C in that situation. This patch fixes that issue. --- winsup/cygwin/fhandler.h | 4 +-

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

2019-09-06 Thread Takashi Yano
- When the I/O pipe is switched to the pseudo console side, the behaviour of Ctrl-C is unstable. This rarely happens, however, for example, shell sometimes crashes by Ctrl-C in that situation. This patch fixes that issue. --- winsup/cygwin/fhandler.h | 4 +-

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

2019-09-06 Thread Takashi Yano
Sorry again. Please apply v3. On Fri, 6 Sep 2019 23:42:38 +0900 Takashi Yano wrote: > - When the I/O pipe is switched to the pseudo console side, the > behaviour of Ctrl-C is unstable. This rarely happens, however, > for example, shell sometimes crashes by Ctrl-C in that

[PATCH 0/1] Cygwin: pty: Fix potential state mismatch regarding pseudo console.

2019-09-05 Thread Takashi Yano
- PTY with pseudo console support sitll has problem which potentially cause state mismatch between state variable and real console state. This patch fixes this issue. Takashi Yano (1): Cygwin: pty: Fix potential state mismatch regarding pseudo console. winsup/cygwin/dtable.cc | 9

[PATCH 1/1] Cygwin: pty: Fix potential state mismatch regarding pseudo console.

2019-09-05 Thread Takashi Yano
- PTY with pseudo console support sitll has problem which potentially cause state mismatch between state variable and real console state. This patch fixes this issue. --- winsup/cygwin/dtable.cc | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git

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] 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

[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

[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

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

2019-09-21 Thread Takashi Yano
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 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 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

[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

[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

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

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

2019-11-06 Thread Takashi Yano
gacy mode. 2) Open command prompt. 3) set TERM 4) start cygwin What situation do you assume this causes problem? -- Takashi Yano

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 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

[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

[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

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, inste

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

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

[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,

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: 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

[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: 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

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

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

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 se

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

2019-10-18 Thread Takashi Yano
ase call me Takashi as always. -- 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: 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
ot so strange, I suppose. -- Takashi Yano

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

2019-10-21 Thread Takashi Yano
rted. 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

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

[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 +++

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-24 Thread Takashi Yano
ce. 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-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-23 Thread Takashi Yano
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-18 Thread Takashi Yano
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 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

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: Trigger redraw screen if ESC[?3h or ESC[?3l is sent.

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

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

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

[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

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

2019-12-20 Thread Takashi Yano
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 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: 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

[PATCH 2/2] Cygwin: console: Add support for REP escape sequence to xterm mode.

2020-02-25 Thread Takashi Yano
- In Win10 upto 1809, xterm compatible mode does not have REP escape sequence which terminfo declares. This patch adds support for "CSI Ps b" (REP). With this patch, bvi (binary editor) works normally in Win10 1809. Also, xterm compatible mode does not have "CSI Pm `" (HPA), "CSI Pm a"

[PATCH 1/2] Cygwin: console: Add workaround for broken IL/DL in xterm mode.

2020-02-25 Thread Takashi Yano
- Cygwin console with xterm compatible mode causes problem reported in https://www.cygwin.com/ml/cygwin-patches/2020-q1/msg00212.html if background/foreground colors are set to gray/black respectively in Win10 1903/1909. This is caused by "CSI Ps L" (IL), "CSI Ps M" (DL) and "ESC M" (RI)

[PATCH 0/2] Modify handling of several ESC sequences in xterm mode.

2020-02-25 Thread Takashi Yano
Takashi Yano (2): Cygwin: console: Add workaround for broken IL/DL in xterm mode. Cygwin: console: Add support for REP escape sequence to xterm mode. winsup/cygwin/fhandler_console.cc | 215 ++ winsup/cygwin/wincap.cc | 20 +++ winsup/cygwin/wincap.h

Re: [PATCH] Cygwin: console: Fix segfault on shared_console_info access.

2020-02-25 Thread Takashi Yano
> make a workaround for this. I will try. > > That would be great! I have successfully made a workaround for this issue. I will submit it shortly. -- Takashi Yano

Re: [PATCH] Cygwin: console: Fix segfault on shared_console_info access.

2020-02-24 Thread Takashi Yano
ackground and gray fore- ground. Do not these happen in your environment? Oh, wait. I was setting foreground and background color in "terminal" tab in property. If I set them in "colors" tab, cmd.exe behaves differently. In this setting, your problem does not seems to occur. -- Takashi Yano

Re: [PATCH 1/2] Cygwin: console: Add workaround for broken IL/DL in xterm mode.

2020-02-26 Thread Takashi Yano
Hi Corinna, On Wed, 26 Feb 2020 02:14:37 +0900 Takashi Yano wrote: > - Cygwin console with xterm compatible mode causes problem reported > in https://www.cygwin.com/ml/cygwin-patches/2020-q1/msg00212.html > if background/foreground colors are set to gray/black respectively > i

[PATCH v2 1/4] Cygwin: console: Add workaround for broken IL/DL in xterm mode.

2020-02-26 Thread Takashi Yano
- Cygwin console with xterm compatible mode causes problem reported in https://www.cygwin.com/ml/cygwin-patches/2020-q1/msg00212.html if background/foreground colors are set to gray/black respectively in Win10 1903/1909. This is caused by "CSI Ps L" (IL), "CSI Ps M" (DL) and "ESC M" (RI)

[PATCH v2 2/4] Cygwin: console: Unify workaround code for CSI3J and CSI?1049h/l.

2020-02-26 Thread Takashi Yano
- This patch unifies workaround code for CSI3J and CSI?1049h/l into the code handling other escape sequences in xterm mode. --- winsup/cygwin/fhandler_console.cc | 43 --- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git

[PATCH v2 4/4] Cygwin: console: Add emulation of CSI3J on Win10 1809.

2020-02-26 Thread Takashi Yano
- This patch add emulation of CSI3J, which is broken in Win10 1809, rather than ignoring it as before. --- winsup/cygwin/fhandler_console.cc | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/fhandler_console.cc

[PATCH v2 3/4] Cygwin: console: Add support for REP escape sequence to xterm mode.

2020-02-26 Thread Takashi Yano
- In Win10 upto 1809, xterm compatible mode does not have REP escape sequence which terminfo declares. This patch adds support for "CSI Ps b" (REP). With this patch, bvi (binary editor) works normally in Win10 1809. Also, xterm compatible mode does not have "CSI Pm `" (HPA), "CSI Pm a"

[PATCH v2 0/4] Modify handling of several ESC sequences in xterm mode.

2020-02-26 Thread Takashi Yano
Takashi Yano (4): Cygwin: console: Add workaround for broken IL/DL in xterm mode. Cygwin: console: Unify workaround code for CSI3J and CSI?1049h/l. Cygwin: console: Add support for REP escape sequence to xterm mode. Cygwin: console: Add emulation of CSI3J on Win10 1809. winsup/cygwin

Re: [PATCH v2 1/4] Cygwin: console: Add workaround for broken IL/DL in xterm mode.

2020-02-29 Thread Takashi Yano
= x; > >} Indeed. You are right. Thanks for pointing out that. Another similar problem exists in console code of escape sequence handling, so I will submit a patch for that. As for wpbuf, please continue to fix. -- Takashi Yano

Re: [PATCH v2 1/4] Cygwin: console: Add workaround for broken IL/DL in xterm mode.

2020-02-29 Thread Takashi Yano
1: 2.315627 second Total2: 1.588511 second Total3: 1.571572 second Class implementation is slow 40% than inline or macro. So, IMHO, inline static function is the best. -- Takashi Yano #include #include #define WPBUF_LEN 256 class { private: unsigned char buf[WPBUF_LEN]; int ixput; public:

Re: [PATCH v2 1/4] Cygwin: console: Add workaround for broken IL/DL in xterm mode.

2020-03-01 Thread Takashi Yano
On Sun, 1 Mar 2020 14:56:31 +0100 Hans-Bernhard Bröker wrote: > Am 01.03.2020 um 07:33 schrieb Takashi Yano: > > > However, from the view point of performance, just inline > > static function is better. > > I don't see how that could be the case. Inline methods of a sta

[PATCH 4/4] Cygwin: console: Add a workaround for "ESC 7" and "ESC 8".

2020-03-01 Thread Takashi Yano
- In xterm compatible mode, "ESC 7" and "ESC 8" do not work properly in the senario: 1) Execute /bin/ls /bin to fill screen. 2) Sned CSI?1049h to alternate screen. 3) Reduce window size. 4) Send CSI?1049l to resume screen. 5) Send "ESC 7" and "ESC 8". After sending "ESC 8", the

[PATCH 2/4] Cygwin: console: Fix setting/unsetting xterm mode for input.

2020-03-01 Thread Takashi Yano
- This patch fixes the issue that xterm compatible mode for input is not correctly set/unset in some situation such as: 1) cat is stopped by ctrl-c. 2) The window size is changed in less. In case 1), request_xterm_mode_input(true) is called in read(), however, cat is stopped without

[PATCH 3/4] Cygwin: console: Prevent buffer overrun.

2020-03-01 Thread Takashi Yano
- This patch prevent potential buffer overrun in the code handling escape sequences. --- winsup/cygwin/fhandler_console.cc | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc index

[PATCH 1/4] Cygwin: console: Revise the code to fix tab position.

2020-03-01 Thread Takashi Yano
- This patch fixes the issue that the cursor position is broken if window size is changed while executing vim, less etc. --- winsup/cygwin/fhandler_console.cc | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/winsup/cygwin/fhandler_console.cc

[PATCH 0/4] Cygwin: console: Some fixes for console in xterm mode.

2020-03-01 Thread Takashi Yano
Takashi Yano (4): Cygwin: console: Revise the code to fix tab position. Cygwin: console: Fix setting/unsetting xterm mode for input. Cygwin: console: Prevent buffer overrun. Cygwin: console: Add a workaround for "ESC 7" and "ESC 8". winsup/cygwin/fhandler.h |

Re: [PATCH 1/1] Collect handling of wpixput and wpbuf into a helper class.

2020-03-03 Thread Takashi Yano
pixput = 0; // <--- Here So, this might not be worth much... -- Takashi Yano

Re: [PATCH 1/1] Collect handling of wpixput and wpbuf into a helper class.

2020-03-03 Thread Takashi Yano
line void sendOut (HANDLE ) > { >WriteConsoleA (handle, buf, ixput, 0, 0); > } > > The same would apply to all the other calls of WriteConsoleA, it seems. Yeah, it could be. However, please note that it should be saparate patch if you remove wn from WriteConsoleA() other than wpbuf related. -- Takashi Yano

Re: [PATCH v2 1/4] Cygwin: console: Add workaround for broken IL/DL in xterm mode.

2020-02-27 Thread Takashi Yano
this issue, may I leave it to you because you are already working on it? -- Takashi Yano

[PATCH] Cygwin: console: Adjust the detailed behaviour of ESC sequences.

2020-02-26 Thread Takashi Yano
- This patch makes some detailed behaviour of ESC sequences such as "CSI Ps L" (IL), "CSI Ps M" (DL) and "ESC M" (RI) in xterm mode match with real xterm. --- winsup/cygwin/fhandler.h | 1 + winsup/cygwin/fhandler_console.cc | 51 ++- 2 files changed, 45

Re: [PATCH v2 1/4] Cygwin: console: Add workaround for broken IL/DL in xterm mode.

2020-02-28 Thread Takashi Yano
think it is already thread-safe. -- Takashi Yano

[PATCH] Cygwin: console: Fix behaviour of "ESC 8" after reset.

2020-03-05 Thread Takashi Yano
- This patch matches the behaviour of "ESC 8" (DECRC) to the real xterm after full reset (RIS), soft reset (DECSTR) and "CSI 3 J". --- winsup/cygwin/fhandler_console.cc | 7 +++ 1 file changed, 7 insertions(+) diff --git a/winsup/cygwin/fhandler_console.cc

Re: [PATCH] Cygwin: console: Fix segfault on shared_console_info access.

2020-02-24 Thread Takashi Yano
On Tue, 25 Feb 2020 12:08:16 +0900 Takashi Yano wrote: > On Mon, 24 Feb 2020 19:33:18 +0100 > Corinna Vinschen wrote: > > Is there some kind of workaround for that problem? Otherwise defaulting > > to a (broken) xterm mode instead of a (working) cygwin mode is a bit >

[PATCH v2] Cygwin: console: Fix segfault on shared_console_info access.

2020-02-24 Thread Takashi Yano
- Accessing shared_console_info before initialization causes access violation because it is a NULL pointer. The cause of the problem reported in https://cygwin.com/ml/cygwin/2020-02/msg00197.html is this NULL pointer access in request_xterm_mode_output() when it is called from close().

Re: [PATCH] Cygwin: console: Fix segfault on shared_console_info access.

2020-02-24 Thread Takashi Yano
33[H\033[5L' causes the similar result. The following code cause the problem as well. #include int main() { CONSOLE_SCREEN_BUFFER_INFO sbi; SMALL_RECT r; COORD c = {0, 0}; CHAR_INFO f = {' ', 0}; HANDLE h = GetStdHandle(STD_OUTPUT_HANDLE); DWORD n; ReadConsoleOutputAttribute(h, , 1, c, ); GetConsoleScreenBufferInfo(h, ); c.X = 0; c.Y = sbi.srWindow.Top + 5; ScrollConsoleScreenBuffer(h, , NULL, c, ); return 0; } -- Takashi Yano

Re: [PATCH 1/1] Collect handling of wpixput and wpbuf into a helper class.

2020-03-02 Thread Takashi Yano
p like: inline void sendOut (HANDLE ) { DWORD wn; WriteConsoleA (handle, buf, ixput, , 0); } -- Takashi Yano

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

2020-01-26 Thread Takashi Yano
- After commit 6cc299f0e20e4b76f7dbab5ea8c296ffa4859b62, outputs of cygwin programs which call both printf() and WriteConsole() are frequently distorted. This patch fixes the issue. --- winsup/cygwin/fhandler.h | 2 ++ winsup/cygwin/fhandler_tty.cc | 46

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

2020-01-26 Thread Takashi Yano
On Sun, 26 Jan 2020 22:33:19 +0900 Takashi Yano wrote: > On Sat, 25 Jan 2020 20:38:37 +0900 > Takashi Yano wrote: > > On Fri, 24 Jan 2020 12:07:30 +0100 > > Corinna Vinschen wrote: > > > Too bad. It's pretty strange that CreatePseudoConsole returns a > > > vali

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

2020-01-26 Thread Takashi Yano
On Mon, 27 Jan 2020 11:38:22 +0900 Takashi Yano wrote: > On Sun, 26 Jan 2020 22:33:19 +0900 > Takashi Yano wrote: > > On Sat, 25 Jan 2020 20:38:37 +0900 > > Takashi Yano wrote: > > > On Fri, 24 Jan 2020 12:07:30 +0100 > > > Corinna Vinschen wrote: &

[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

[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 +++---

[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 v3] Cygwin: pty: Revise code waiting for forwarding again.

2020-01-26 Thread Takashi Yano
- After commit 6cc299f0e20e4b76f7dbab5ea8c296ffa4859b62, outputs of cygwin programs which call both printf() and WriteConsole() are frequently distorted. This patch fixes the issue. --- winsup/cygwin/fhandler.h | 2 ++ winsup/cygwin/fhandler_tty.cc | 40

<    1   2   3   4   5   6   7   8   9   >