From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22286 invoked from network); 29 Apr 1999 16:02:13 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 29 Apr 1999 16:02:13 -0000 Received: (qmail 9288 invoked by alias); 29 Apr 1999 16:02:01 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6156 Received: (qmail 9266 invoked from network); 29 Apr 1999 16:02:00 -0000 From: "Bart Schaefer" Message-Id: <990429090122.ZM8426@candle.brasslantern.com> Date: Thu, 29 Apr 1999 09:01:22 -0700 In-Reply-To: <199904290549.OAA26192@pop1.ngy.3web.ne.jp> Comments: In reply to Tatsuo Furukawa "zsh hangs (3.0.6-pre-2, 3.1.5-pws-16)" (Apr 29, 2:28pm) References: <199904290549.OAA26192@pop1.ngy.3web.ne.jp> X-Mailer: Z-Mail (4.0b.820 20aug96) To: Tatsuo Furukawa , zsh-workers@sunsite.auc.dk Subject: Re: zsh hangs (3.0.6-pre-2, 3.1.5-pws-16) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Apr 29, 2:28pm, Tatsuo Furukawa wrote: } Subject: zsh hangs (3.0.6-pre-2, 3.1.5-pws-16) } } 1. Write following in .zshrc } } RPROMPT="(%l)" } } function TRAPWINCH() { } eval $(resize) } echo; } echo "resized"; } echo } } } } 4. Change terminal size using mouse. } } Then "resized" message is displayed, and RPROMPT is displayed into } 'right' place. (But why is "resized" message displayed twice?) The message is displayed twice because the "resize" command itself causes a SIGWINCH to be sent. So you get one when xterm finishes remapping, and another when resize runs. I'm not entirely sure why this doesn't cause an infinite loop; perhaps resize only sends a SIGWINCH when the values it reads back from the terminal do not match what's in the environment. The hang appears to be a race condition in exec.c: getoutput(). Zsh is blocked forever in sigsuspend() waiting for the SIGCHLD that will tell it `resize` has exited. Probably that signal arrived while zsh was handling the SIGWINCH sent by "resize" and zsh either improperly handled it then or dropped it on the floor. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com