public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: L A Walsh <cygwin@tlinx.org>
To: cygwin@cygwin.com
Subject: Re: Cygwin doesn't handle SIGWINCH properly in Windows Terminal
Date: Tue, 16 Feb 2021 13:55:49 -0800	[thread overview]
Message-ID: <602C3F65.9050505@tlinx.org> (raw)
In-Reply-To: <92a91e86-780f-e0de-8db2-04e89af3f7d7@towo.net>

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


  parent reply	other threads:[~2021-02-16 21:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-13 10:39 Alvin Seville
2021-02-13 17:38 ` Brian Inglis
2021-02-14  8:43 ` Takashi Yano
2021-02-14 20:44   ` L A Walsh
2021-02-15  0:05     ` Takashi Yano
2021-02-16  2:17       ` L A Walsh
2021-02-16  5:48         ` Marco Atzeri
2021-02-16  6:20           ` Brian Inglis
2021-02-16 10:26             ` Thomas Wolff
2021-02-16 10:38               ` Thomas Wolff
2021-02-16 21:55               ` L A Walsh [this message]
2021-02-15  0:21     ` Takashi Yano
2021-02-16 10:31   ` Takashi Yano
2021-02-16 11:31     ` Takashi Yano
2021-02-16 16:26       ` Brian Inglis
2021-02-16 20:37         ` Takashi Yano
2021-02-16 20:50           ` Thomas Wolff
2021-02-16 22:11             ` Brian Inglis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=602C3F65.9050505@tlinx.org \
    --to=cygwin@tlinx.org \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).