Re: Cygwin doesn't handle SIGWINCH properly in Windows Terminal

2021-02-16 Thread Brian Inglis
On 2021-02-16 13:50, Thomas Wolff wrote: Am 16.02.2021 um 21:37 schrieb Takashi Yano via Cygwin: On Tue, 16 Feb 2021 09:26:52 -0700 Brian Inglis wrote: On 2021-02-16 04:31, Takashi Yano via Cygwin wrote: On Tue, 16 Feb 2021 19:31:54 +0900 Takashi Yano wrote: On Sun, 14 Feb 2021 17:43:58 +0900

Re: Cygwin doesn't handle SIGWINCH properly in Windows Terminal

2021-02-16 Thread L A Walsh
On 2021/02/16 02:26, Thomas Wolff wrote: I have a similar trap in my .bashrc and it's being triggered when running bash from either cmd (conhost) or Windows Terminal and resizing them. Did I miss something in this issue? What do you mean by "reset LINES/COLUMNS"? I am not sure what is th

Re: Cygwin doesn't handle SIGWINCH properly in Windows Terminal

2021-02-16 Thread Thomas Wolff
Am 16.02.2021 um 21:37 schrieb Takashi Yano via Cygwin: On Tue, 16 Feb 2021 09:26:52 -0700 Brian Inglis wrote: On 2021-02-16 04:31, Takashi Yano via Cygwin wrote: On Tue, 16 Feb 2021 19:31:54 +0900 Takashi Yano wrote: On Sun, 14 Feb 2021 17:43:58 +0900 Takashi Yano wrote: On Sat, 13 Feb 2021

Re: Cygwin doesn't handle SIGWINCH properly in Windows Terminal

2021-02-16 Thread Takashi Yano via Cygwin
On Tue, 16 Feb 2021 09:26:52 -0700 Brian Inglis wrote: > On 2021-02-16 04:31, Takashi Yano via Cygwin wrote: > > On Tue, 16 Feb 2021 19:31:54 +0900 > > Takashi Yano wrote: > >> On Sun, 14 Feb 2021 17:43:58 +0900 > >> Takashi Yano wrote: > >>> On Sat, 13 Feb 2021 20:39:39 +1000 > >>> Alvin Seville w

Re: Cygwin doesn't handle SIGWINCH properly in Windows Terminal

2021-02-16 Thread Brian Inglis
On 2021-02-16 04:31, Takashi Yano via Cygwin wrote: On Tue, 16 Feb 2021 19:31:54 +0900 Takashi Yano wrote: On Sun, 14 Feb 2021 17:43:58 +0900 Takashi Yano wrote: On Sat, 13 Feb 2021 20:39:39 +1000 Alvin Seville wrote: Windows build number: Win32NT 10.0.19042.0 Microsoft Windows NT 10.0.19042.0

Re: Cygwin doesn't handle SIGWINCH properly in Windows Terminal

2021-02-16 Thread Takashi Yano via Cygwin
On Tue, 16 Feb 2021 19:31:54 +0900 Takashi Yano wrote: > On Sun, 14 Feb 2021 17:43:58 +0900 > Takashi Yano wrote: > > On Sat, 13 Feb 2021 20:39:39 +1000 > > Alvin Seville wrote: > > > Windows build number: Win32NT 10.0.19042.0 Microsoft Windows NT > > > 10.0.19042.0 > > > Windows Terminal version

Re: Cygwin doesn't handle SIGWINCH properly in Windows Terminal

2021-02-16 Thread Thomas Wolff
Am 16.02.2021 um 11:26 schrieb Thomas Wolff: Am 16.02.2021 um 07:20 schrieb Brian Inglis: On 2021-02-15 22:48, Marco Atzeri via Cygwin wrote: On 16.02.2021 03:17, L A Walsh wrote: On 2021/02/14 16:05, Takashi Yano wrote: On Sun, 14 Feb 2021 12:44:32 -0800 L A Walsh wrote: showsize () {\   d

Re: Cygwin doesn't handle SIGWINCH properly in Windows Terminal

2021-02-16 Thread Takashi Yano via Cygwin
On Sun, 14 Feb 2021 17:43:58 +0900 Takashi Yano wrote: > On Sat, 13 Feb 2021 20:39:39 +1000 > Alvin Seville wrote: > > Windows build number: Win32NT 10.0.19042.0 Microsoft Windows NT 10.0.19042.0 > > Windows Terminal version (if applicable): 1.5.10271.0 > > > > Script to reproduce this issue: > >

Re: Cygwin doesn't handle SIGWINCH properly in Windows Terminal

2021-02-16 Thread Thomas Wolff
Am 16.02.2021 um 07:20 schrieb Brian Inglis: On 2021-02-15 22:48, Marco Atzeri via Cygwin wrote: On 16.02.2021 03:17, L A Walsh wrote: On 2021/02/14 16:05, Takashi Yano wrote: On Sun, 14 Feb 2021 12:44:32 -0800 L A Walsh wrote: showsize () {\   declare s=$(stty size); s="(${s// /x})"  ;\   p

Re: Cygwin doesn't handle SIGWINCH properly in Windows Terminal

2021-02-15 Thread Brian Inglis
On 2021-02-15 22:48, Marco Atzeri via Cygwin wrote: On 16.02.2021 03:17, L A Walsh wrote: On 2021/02/14 16:05, Takashi Yano wrote: On Sun, 14 Feb 2021 12:44:32 -0800 L A Walsh wrote: showsize () {\   declare s=$(stty size); s="(${s// /x})"  ;\   printf "%s" "$s${s//?/$'\b'}"   ;\ }; export

Re: Cygwin doesn't handle SIGWINCH properly in Windows Terminal

2021-02-15 Thread Marco Atzeri via Cygwin
On 16.02.2021 03:17, L A Walsh wrote: On 2021/02/14 16:05, Takashi Yano wrote: On Sun, 14 Feb 2021 12:44:32 -0800 L A Walsh wrote: showsize () {\   declare s=$(stty size); s="(${s// /x})"  ;\   printf "%s" "$s${s//?/$'\b'}"   ;\ }; export -f showsize trap showsize SIGWINCH - Wh

Re: Cygwin doesn't handle SIGWINCH properly in Windows Terminal

2021-02-15 Thread L A Walsh
On 2021/02/14 16:05, Takashi Yano wrote: On Sun, 14 Feb 2021 12:44:32 -0800 L A Walsh wrote: showsize () {\ declare s=$(stty size); s="(${s// /x})" ;\ printf "%s" "$s${s//?/$'\b'}" ;\ }; export -f showsize trap showsize SIGWI

Re: Cygwin doesn't handle SIGWINCH properly in Windows Terminal

2021-02-14 Thread Takashi Yano via Cygwin
On Sun, 14 Feb 2021 12:44:32 -0800 L A Walsh wrote: > On 2021/02/14 00:43, Takashi Yano via Cygwin wrote: > > This is because cygwin console handles SIGWINCH when the input > > messages is processed. If the process does not call either read() > > or select(), SIGWINCH will not be sent. This is the

Re: Cygwin doesn't handle SIGWINCH properly in Windows Terminal

2021-02-14 Thread Takashi Yano via Cygwin
On Sun, 14 Feb 2021 12:44:32 -0800 L A Walsh wrote: > On 2021/02/14 00:43, Takashi Yano via Cygwin wrote: > > This is because cygwin console handles SIGWINCH when the input > > messages is processed. If the process does not call either read() > > or select(), SIGWINCH will not be sent. This is the

Re: Cygwin doesn't handle SIGWINCH properly in Windows Terminal

2021-02-14 Thread L A Walsh
On 2021/02/14 00:43, Takashi Yano via Cygwin wrote: This is because cygwin console handles SIGWINCH when the input messages is processed. If the process does not call either read() or select(), SIGWINCH will not be sent. This is the long standing problem of the implementation and hard to fix. ..

Re: Cygwin doesn't handle SIGWINCH properly in Windows Terminal

2021-02-14 Thread Takashi Yano via Cygwin
On Sat, 13 Feb 2021 20:39:39 +1000 Alvin Seville wrote: > Windows build number: Win32NT 10.0.19042.0 Microsoft Windows NT 10.0.19042.0 > Windows Terminal version (if applicable): 1.5.10271.0 > > Script to reproduce this issue: > > #!/usr/bin/env bashfunction outputText() > { > local text=$1 >

Re: Cygwin doesn't handle SIGWINCH properly in Windows Terminal

2021-02-13 Thread Brian Inglis
On 2021-02-13 03:39, Alvin Seville via Cygwin wrote: Windows build number: Win32NT 10.0.19042.0 Microsoft Windows NT 10.0.19042.0 Windows Terminal version (if applicable): 1.5.10271.0 Script to reproduce this issue: #!/usr/bin/env bashfunction outputText() { local text=$1 local -i textLen

Cygwin doesn't handle SIGWINCH properly in Windows Terminal

2021-02-13 Thread Alvin Seville via Cygwin
Windows build number: Win32NT 10.0.19042.0 Microsoft Windows NT 10.0.19042.0 Windows Terminal version (if applicable): 1.5.10271.0 Script to reproduce this issue: #!/usr/bin/env bashfunction outputText() { local text=$1 local -i textLength=${#text} local -i line="$(tput lines) / 2" local