From 8693718ba131e814c99cd5d43bce8bb308b9ba3e Mon Sep 17 00:00:00 2001 From: dsl Date: Wed, 2 Mar 2005 20:57:31 +0000 Subject: [PATCH] Fix printing of invalid commandname after certain types of errors on builtins. Fixes bug bin/29410 in head. All of /bin/sh needs pulling up into 2.0 --- bin/sh/eval.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/sh/eval.c b/bin/sh/eval.c index 79f036784292..f851c3f8da93 100644 --- a/bin/sh/eval.c +++ b/bin/sh/eval.c @@ -1,4 +1,4 @@ -/* $NetBSD: eval.c,v 1.80 2004/10/30 19:29:27 christos Exp $ */ +/* $NetBSD: eval.c,v 1.81 2005/03/02 20:57:31 dsl Exp $ */ /*- * Copyright (c) 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)eval.c 8.9 (Berkeley) 6/8/95"; #else -__RCSID("$NetBSD: eval.c,v 1.80 2004/10/30 19:29:27 christos Exp $"); +__RCSID("$NetBSD: eval.c,v 1.81 2005/03/02 20:57:31 dsl Exp $"); #endif #endif /* not lint */ @@ -977,6 +977,7 @@ normal_fork: } e = -1; savehandler = handler; + savecmdname = commandname; handler = &jmploc; if (!setjmp(jmploc.loc)) { /* We need to ensure the command hash table isn't @@ -993,7 +994,6 @@ normal_fork: temp_path = 0; redirect(cmd->ncmd.redirect, mode); - savecmdname = commandname; /* exec is a special builtin, but needs this list... */ cmdenviron = varlist.list; /* we must check 'readonly' flag for all builtins */