From owner-freebsd-bugs Fri Aug 6 7:50: 6 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 5BF0714CB6 for ; Fri, 6 Aug 1999 07:50:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id HAA03403; Fri, 6 Aug 1999 07:50:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Date: Fri, 6 Aug 1999 07:50:01 -0700 (PDT) Message-Id: <199908061450.HAA03403@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Andrew Arensburger Subject: Re: bin/12806: `sh -e' doesn't parse multi-command lines correctly Reply-To: Andrew Arensburger Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR bin/12806; it has been noted by GNATS. From: Andrew Arensburger To: "Danny J. Zerkel" Cc: freebsd-gnats-submit@freebsd.org, arensb@cfar.umd.edu Subject: Re: bin/12806: `sh -e' doesn't parse multi-command lines correctly Date: Fri, 06 Aug 1999 10:43:33 -0400 On Thu, 05 Aug 1999 23:20:12 EDT, "Danny J. Zerkel" wrote: > What it looks like > is that > for a semicolon node, evaltree() calls evaltree() for both sides of the > node and > then retests the eflag, even though it has already been tested on each > side of > the node. There is no reason, that I can see, for the semicolon node to > check > the eflag, so I just made it do the other tests and return. This patch works for me. While it's not as elegant as I would have liked (but I tend to be anal), I haven't been able to come up with a better solution. Theoretically, this patch might change the behavior of /bin/sh if you ever wound up with a tree of the form NAND / \ NSEMI stmt / \ stmt stmt but this can't happen, can it? -- Andrew Arensburger, Systems guy Center for Automation Research arensb@cfar.umd.edu University of Maryland Now we dolly back, now we fade to black... and roll credits! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message