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 5BF0B3858002 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: <60298BB0.1070301@tlinx.org> Date: Sun, 14 Feb 2021 12:44:32 -0800 From: L A Walsh User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: Takashi Yano Subject: Re: Cygwin doesn't handle SIGWINCH properly in Windows Terminal References: <20210214174358 DOT f828f285a566846254c3c54a AT nifty DOT ne DOT jp> In-Reply-To: <20210214174358.f828f285a566846254c3c54a@nifty.ne.jp> 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: , Cc: cygwin AT cygwin DOT com, Alvin Seville Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "Cygwin" On 2021/02/14 00:43, Takashi Yano via Cygwin wrote: > This is because cygwin console handles SIGWINCH when the input > messages is processed. If the process does not call either read() > or select(), SIGWINCH will not be sent. This is the long standing > problem of the implementation and hard to fix. > > .... > > This seems to be a bug of console code. I will submit a patch > for this issue. > --- I'd be careful 'fixing' this, as it seems to work the same way on linux / bash. I have this func setup on bash_profile & bashrc on both cygwin and linux: # display new size of terminal when resized : showsize () {\ declare s=$(stty size); s="(${s// /x})" ;\ printf "%s" "$s${s//?/$'\b'}" ;\ }; export -f showsize trap showsize SIGWINCH ----- Of note, on linux, I didn't have to reset LINES/COLUMNS, however, on cygwin, I note that I should. Oh well -- hmmm....is that a bug? -- 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