Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/bin/sh Fix printing of invalid commandname after certain typ...



details:   https://anonhg.NetBSD.org/src/rev/37ed35e72d45
branches:  trunk
changeset: 574509:37ed35e72d45
user:      dsl <dsl%NetBSD.org@localhost>
date:      Wed Mar 02 20:57:31 2005 +0000

description:
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

diffstat:

 bin/sh/eval.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (34 lines):

diff -r a5d70a70440a -r 37ed35e72d45 bin/sh/eval.c
--- a/bin/sh/eval.c     Wed Mar 02 19:09:22 2005 +0000
+++ b/bin/sh/eval.c     Wed Mar 02 20:57:31 2005 +0000
@@ -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 @@
                }
                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 @@
                                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 */



Home | Main Index | Thread Index | Old Index