Date: Fri, 6 Aug 1999 07:50:01 -0700 (PDT) From: Andrew Arensburger <arensb@cfar.umd.edu> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/12806: `sh -e' doesn't parse multi-command lines correctly Message-ID: <199908061450.HAA03403@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/12806; it has been noted by GNATS. From: Andrew Arensburger <arensb@cfar.umd.edu> To: "Danny J. Zerkel" <dzerkel@columbus.rr.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199908061450.HAA03403>