Cygwin doesn't handle SIGWINCH properly in Windows Terminal

Alvin Seville
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"

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

outputText 'Hello world!'while truedo

As you see Windows Terminal doesn't handle SIGWINCH
<> properly. However
everything works fine when I execute my script directly from Cygwin
Terminal without Windows Terminal which users told
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