From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19780 invoked from network); 2 Dec 2005 22:09:32 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.0 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 2 Dec 2005 22:09:32 -0000 Received: (qmail 26627 invoked from network); 2 Dec 2005 22:09:26 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 2 Dec 2005 22:09:26 -0000 Received: (qmail 6599 invoked by alias); 2 Dec 2005 22:09:24 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22048 Received: (qmail 6588 invoked from network); 2 Dec 2005 22:09:23 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 2 Dec 2005 22:09:23 -0000 Received: (qmail 26338 invoked from network); 2 Dec 2005 22:09:23 -0000 Received: from jlefevre.net1.nerim.net (HELO ay.vinc17.org) (80.65.226.245) by a.mx.sunsite.dk with SMTP; 2 Dec 2005 22:09:22 -0000 Received: from lefevre by ay.vinc17.org with local (Exim 4.54) id 1EiJ5l-0007IM-GU; Fri, 02 Dec 2005 23:09:21 +0100 Date: Fri, 2 Dec 2005 23:09:21 +0100 From: Vincent Lefevre To: zsh-workers@sunsite.dk Subject: Bug in recursive function calls, source and exit Message-ID: <20051202220921.GR8445@ay.vinc17.org> Mail-Followup-To: Vincent Lefevre , zsh-workers@sunsite.dk MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Mailer-Info: http://www.vinc17.org/mutt/ User-Agent: Mutt/1.5.11-vl-20051124 Hi, In a French mailing-list, I've just heard of a bug related to recursive function calls, source and exit; I don't think it has been reported yet. Here's a way to reproduce it: dixsept:~> zsh-beta -f dixsept% echo $ZSH_VERSION 4.3.0-dev-1 dixsept% echo false > ./file dixsept% f() { function> echo $[++i] function> cat file function> sleep 1 function> . ./file || echo exit > ./file function> f function> } dixsept% which f f () { echo $[++i] cat file sleep 1 . ./file || echo exit > ./file f } dixsept% f 1 false 2 exit 3 exit 4 exit 5 exit 6 exit [Ctrl-C] dixsept:~> FYI, bash doesn't have this problem: [...] vlefevre@dixsept:~$ f 1 false 2 exit dixsept:~> -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / SPACES project at LORIA