From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from Ishtar.sc.tlinx.org (ishtar.tlinx.org [173.164.175.65]) by sourceware.org (Postfix) with ESMTPS id A1A383857C73 for ; Tue, 16 Feb 2021 21:57:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A1A383857C73 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tlinx.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cygwin@tlinx.org Received: from [192.168.3.12] (Athenae [192.168.3.12]) by Ishtar.sc.tlinx.org (8.14.7/8.14.4/SuSE Linux 0.8) with ESMTP id 11GLv3HF054756; Tue, 16 Feb 2021 13:57:06 -0800 Message-ID: <602C3F65.9050505@tlinx.org> Date: Tue, 16 Feb 2021 13:55:49 -0800 From: L A Walsh User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: cygwin@cygwin.com Subject: Re: Cygwin doesn't handle SIGWINCH properly in Windows Terminal References: <20210214174358.f828f285a566846254c3c54a@nifty.ne.jp> <60298BB0.1070301@tlinx.org> <20210215090543.afa8fac6ebec42faa471a5c6@nifty.ne.jp> <602B2B20.1030003@tlinx.org> <1d266c7d-4915-8ff9-069a-04c1f5226eab@gmail.com> <92a91e86-780f-e0de-8db2-04e89af3f7d7@towo.net> In-Reply-To: <92a91e86-780f-e0de-8db2-04e89af3f7d7@towo.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2021 21:57:09 -0000 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 the behaviour diffrence in Linux and cygwin you mentioned. >>>>> ---- running "-bash.exe" from Win-R: > whence -- -bash -bash is /bin/-bash -bash is /usr/bin/-bash # initial size: > echo $LINES/$COLUMNS 30/80 > showsize;printf "\n" (30x80) # shrink by 4 lines; showsize shows 26 lines, but ENV vars are unchanged > showsize;printf "\n$LINES/$COLUMNS\n" (26x80) 30/80 > stty size #shows: 26 80 #checkwinsize is set. > shopt -p checkwinsize shopt -s checkwinsize # same thing happens if I run 'cmd.exe' then start bash.exe Normally, showsize displays size dynamically if I take my finger off the mouse -- only way to see win size as I resize it. However in cmd.exe, it doesn't work. AFAIK, its always been this way in Win7. There were a bunch of bugs in Win7 that MS refused to release, or in some cases, only upon request (hotfix). While there was a SP2 for the corresponding server edition of Win7 (Win2008), they didn't want to ship a Win7SP2, because they wanted to force people to upgrade to get fixes, so they left known bugs in Win7 for as much as 6-7 years before they started telling users who had known bugs they weren't going to fix, to upgrade to Win10 if they wanted it fixed. OTOH, if you want to fix this, that's great, but there are other problems in cmd.exe like 'erase' not working in some ms-cmd line programs (netsh coming to mind), but other ms-programs only work when attached to 'cons0', like 'sc' doesn't read input when it asks if you want to see more help when run from mintty, but it works from cmd.exe. Many of these were reported to MS before SP1, and weren't fixed. Should be criminal -- if they won't support it, then source should be released. -l