From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from dns.primenet.com.au (dns.primenet.com.au [203.24.36.40]) by coral.primenet.com.au (8.7.5/8.7.3) with ESMTP id PAA00732 for ; Sat, 31 Aug 1996 15:28:52 +1000 (EST) Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by dns.primenet.com.au (8.7.5/8.7.3) with ESMTP id KAA01817 for ; Sat, 31 Aug 1996 10:44:52 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id UAA13479; Fri, 30 Aug 1996 20:32:03 -0400 (EDT) Resent-Date: Fri, 30 Aug 1996 20:32:03 -0400 (EDT) Message-Id: <199608310030.SAA37469@clinicom.com> Subject: bug with "r" command To: zsh-workers@math.gatech.edu Date: Fri, 30 Aug 1996 18:30:36 -0600 (MDT) From: "J.D. Laub" Organization: The Psychiatric Ward of Terrors X-Mailer: ELM [version 2.4 PL24 PGP3 *ALPHA*] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"F50I5.0.UI3.2Wu9o"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/2094 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Using the "r" command (sometimes?) sets $? to 0 when it should not. This wreaks havoc with scripts that 1) test $?, and 2) that happen to have been run with "r". Simple example: Script started on Fri Aug 30 17:41:16 1996 chimay% ./zsh -f chimay% print $ZSH_VERSION 3.0.0 chimay% fg fg: no current job chimay% print $? 1 chimay% fg fg: no current job chimay% r pri print $? 0 chimay% exit chimay% exit script done on Fri Aug 30 17:42:00 1996 Probably naive observation: the culprit looks like exec.c:1663 getting executed twice: the first changes "r pri" to "print $?", and the second actually runs the print. The problem is that the first execution sets lastval to 0, and it doesn't get reset back to 1 before the second execution. -- J.D. Laub (Laubster) HBOC/CliniCom|"I think you're very, very, very, very, very, jdl@clinicom.com Boulder,CO |very, very, very, very, ..." - Flying Lizards