X-Recipient: archive-cygwin AT delorie DOT com X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com 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 AT tlinx DOT org 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 AT cygwin DOT com Subject: Re: Cygwin doesn't handle SIGWINCH properly in Windows Terminal References: <20210214174358 DOT f828f285a566846254c3c54a AT nifty DOT ne DOT jp> <60298BB0 DOT 1070301 AT tlinx DOT org> <20210215090543 DOT afa8fac6ebec42faa471a5c6 AT nifty DOT ne DOT jp> <602B2B20 DOT 1030003 AT tlinx DOT org> <1d266c7d-4915-8ff9-069a-04c1f5226eab AT gmail DOT com> <92a91e86-780f-e0de-8db2-04e89af3f7d7 AT towo DOT net> In-Reply-To: <92a91e86-780f-e0de-8db2-04e89af3f7d7@towo.net> 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 AT cygwin DOT com X-Mailman-Version: 2.1.29 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "Cygwin" 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 -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple