From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20122 invoked from network); 3 Feb 2000 17:40:36 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 3 Feb 2000 17:40:36 -0000 Received: (qmail 26943 invoked by alias); 3 Feb 2000 17:40:29 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9548 Received: (qmail 26933 invoked from network); 3 Feb 2000 17:40:28 -0000 From: "Bart Schaefer" Message-Id: <1000203174022.ZM7879@candle.brasslantern.com> Date: Thu, 3 Feb 2000 17:40:22 +0000 In-Reply-To: <200001311204.NAA01734@beta.informatik.hu-berlin.de> Comments: In reply to Sven Wischnowsky "Re: Infinite loop (bug in wordcode evaluation?)" (Jan 31, 1:04pm) References: <200001311204.NAA01734@beta.informatik.hu-berlin.de> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.auc.dk Subject: Re: Infinite loop (bug in wordcode evaluation?) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jan 31, 1:04pm, Sven Wischnowsky wrote: } Subject: Re: Infinite loop (bug in wordcode evaluation?) } } } Bart Schaefer wrote: } } > function hang() { } > emulate -L zsh } > trap return HUP INT QUIT } > for ((i=0; 1; i=0)) do } > tmp=() } > vared -p "Type ^C here: " tmp } > done } > } } > } > If you interrupt this with ^C, 3.1.6-dev.16 goes into a loop repeatedly } > evaluating the "for" expressions on an empty loop body. The "trap" is } > important. } } The problem is that none of the functions in loop.c check if retflag } is set and hence don't return. But this was not changed by the } wordcode stuff -- and a older zsh without that I have here behaves } the same. In fact, I think that zsh behaved this way either always or } for a long time. I can't find any loop construct in 3.0.7 that produces this behavior, yet 3.0.7 does not have any of those extra retflag tests in loop.c. Does anyone know what else might have changed to cause this problem? I want to understand it so that I don't leave a bug in 3.0.8. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com