From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5658 invoked from network); 24 Oct 1998 18:47:04 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 24 Oct 1998 18:47:04 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id OAA12268; Sat, 24 Oct 1998 14:40:10 -0400 (EDT) Resent-Date: Sat, 24 Oct 1998 14:40:10 -0400 (EDT) From: "Bart Schaefer" Message-Id: <981024114334.ZM30186@candle.brasslantern.com> Date: Sat, 24 Oct 1998 11:43:34 -0700 In-Reply-To: <199810241051.TAA14130@pop1.ngy.3web.ne.jp> Comments: In reply to Tatsuo Furukawa "[3.0.5] patch for resize problem" (Oct 24, 7:52pm) References: <199810241051.TAA14130@pop1.ngy.3web.ne.jp> X-Mailer: Z-Mail (4.0b.820 20aug96) To: Tatsuo Furukawa , zsh-workers@math.gatech.edu Subject: Re: [3.0.5] patch for resize problem Cc: olsenc@ichips.intel.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"azPRv2.0.c_2.9yXCs"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4447 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Oct 24, 7:52pm, Tatsuo Furukawa wrote: } Subject: [3.0.5] patch for resize problem } } Hello zsh developpers. } } I incorporated 3.1.4's resize code into 3.0.5. And it works well. Unfortunately, what you did, except for irrelevant details in params.c, is revert back to the 3.0.4 code. The semantics in 3.1.4 are unchanged from 3.0.4, so incorporating 3.1.4 is in this instance a step backwards. Although I don't entirely like the 3.0.5 behavior, *I've* never had a problem with eval $(resize) setting LINES and COLUMNS correctly (which was Clint's original complaint). It is true that 3.0.5 doesn't respond to SIGWINCH, but the 3.0.4 behavior has different bugs that the changes in 3.0.5 were intended to address, and I presume it is an accident that the 3.0.5 code isn't in 3.1.4. If Clint is still out there listening: Does zsh receive a SIGWINCH when you eval $(resize)? If so, guess what: You're probably not getting any output from $(resize) at all, because of the EINTR bug in readoutput() for which I posted a patch a few days ago. Please try applying my patch from zsh-users/1880 (note that's zsh-USERS, not -workers) and tell us if resize starts working for you again. If the EINTR patch works, then TRAPWINCH() { eval $(resize) } should work too. (It does for me even without the EINTR patch, but then I never had any problems with resize to begin with.) If all you care about is having zsh believe SIGWINCH signals, then a much simpler patch to 3.0.5, which doesn't back out the other bug fixes, is: Index: Src/utils.c --- utils.c Sat May 23 08:53:31 1998 +++ - Sat Oct 24 11:36:47 1998 @@ -855,9 +855,9 @@ usercols = columns > 0; if (!ioctl(SHTTY, TIOCGWINSZ, (char *)&shttyinfo.winsize)) { - if (!userlines) + if (!userlines || from == 1) lines = shttyinfo.winsize.ws_row; - if (!usercols) + if (!usercols || from == 1) columns = shttyinfo.winsize.ws_col; } #endif /* TIOCGWINSZ */ -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com