Cygwin doesn't handle SIGWINCH properly in Windows Terminal

Alvin Seville alvinseville7cf@gmail.com
Sat Feb 13 10:39:39 GMT 2021


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 -i col="$(tput cols) / 2 - $textLength / 2"

  clear
  echo -en "\e[$line;${col}H$text"
}
trap "outputText 'Hello world!'" SIGWINCH

outputText 'Hello world!'while truedo
    :done

As you see Windows Terminal doesn't handle SIGWINCH
<https://man7.org/linux/man-pages/man7/signal.7.html> properly. However
everything works fine when I execute my script directly from Cygwin
Terminal without Windows Terminal which users told
<https://github.com/microsoft/terminal/issues/9113#issuecomment-777703560>
me that it seems to be a Cygwin bug.
-- 
alvinseville7cf@Alvins-MacBook-Pro ~ $* echo *"Best regards, Alvin Seville."*
&& exit*


More information about the Cygwin mailing list