From 5b12149227a866bd135ba0a7a4562f7693e50f65 Mon Sep 17 00:00:00 2001 From: cracauer Date: Mon, 4 May 1998 07:24:10 +0000 Subject: When calling a shell function, remember whether exit status is tested. This is needed for the '-e' option. See the PR for more details. PR: 6047 Reviewed by: PR submitter, silence on review request. --- bin/sh/eval.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'bin/sh/eval.c') diff --git a/bin/sh/eval.c b/bin/sh/eval.c index acf21f6..0e6d86c 100644 --- a/bin/sh/eval.c +++ b/bin/sh/eval.c @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: eval.c,v 1.12 1997/04/28 03:06:33 steve Exp $ + * $Id: eval.c,v 1.13 1997/05/19 00:18:36 steve Exp $ */ #ifndef lint @@ -764,7 +764,10 @@ evalcommand(cmd, flags, backcmd) for (sp = varlist.list ; sp ; sp = sp->next) mklocal(sp->text); funcnest++; - evaltree(cmdentry.u.func, 0); + if (flags & EV_TESTED) + evaltree(cmdentry.u.func, EV_TESTED); + else + evaltree(cmdentry.u.func, 0); funcnest--; INTOFF; poplocalvars(); -- cgit v1.1