summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bin/sh/eval.c10
-rw-r--r--bin/sh/main.c8
2 files changed, 10 insertions, 8 deletions
diff --git a/bin/sh/eval.c b/bin/sh/eval.c
index 53b8dd5fc56..2144c401436 100644
--- a/bin/sh/eval.c
+++ b/bin/sh/eval.c
@@ -1,4 +1,4 @@
-/* $NetBSD: eval.c,v 1.24 1995/05/15 03:29:54 cgd Exp $ */
+/* $NetBSD: eval.c,v 1.25 1995/05/19 15:08:55 christos Exp $ */
/*-
* Copyright (c) 1993
@@ -38,9 +38,9 @@
#ifndef lint
#if 0
-static char sccsid[] = "@(#)eval.c 8.7 (Berkeley) 5/15/95";
+static char sccsid[] = "@(#)eval.c 8.8 (Berkeley) 5/19/95";
#else
-static char rcsid[] = "$NetBSD: eval.c,v 1.24 1995/05/15 03:29:54 cgd Exp $";
+static char rcsid[] = "$Header: /cvsroot/src/bin/sh/eval.c,v 1.25 1995/05/19 15:08:55 christos Exp $";
#endif
#endif /* not lint */
@@ -679,7 +679,7 @@ evalcommand(cmd, flags, backcmd)
} else {
find_command(argv[0], &cmdentry, 1);
if (cmdentry.cmdtype == CMDUNKNOWN) { /* command not found */
- exitstatus = 2;
+ exitstatus = 1;
flushout(&errout);
return;
}
@@ -691,7 +691,7 @@ evalcommand(cmd, flags, backcmd)
break;
if ((cmdentry.u.index = find_builtin(*argv)) < 0) {
outfmt(&errout, "%s: not found\n", *argv);
- exitstatus = 2;
+ exitstatus = 1;
flushout(&errout);
return;
}
diff --git a/bin/sh/main.c b/bin/sh/main.c
index 3407f6c9fac..023e22d2ef5 100644
--- a/bin/sh/main.c
+++ b/bin/sh/main.c
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.18 1995/05/11 21:29:25 christos Exp $ */
+/* $NetBSD: main.c,v 1.19 1995/05/19 15:08:58 christos Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -44,9 +44,9 @@ static char copyright[] =
#ifndef lint
#if 0
-static char sccsid[] = "@(#)main.c 8.4 (Berkeley) 5/4/95";
+static char sccsid[] = "@(#)main.c 8.5 (Berkeley) 5/19/95";
#else
-static char rcsid[] = "$NetBSD: main.c,v 1.18 1995/05/11 21:29:25 christos Exp $";
+static char rcsid[] = "$Header: /cvsroot/src/bin/sh/main.c,v 1.19 1995/05/19 15:08:58 christos Exp $";
#endif
#endif /* not lint */
@@ -119,6 +119,8 @@ main(argc, argv)
* exception EXSHELLPROC to clean up before executing
* the shell procedure.
*/
+ if (exception == EXERROR)
+ exitstatus = 2;
if (exception == EXSHELLPROC) {
rootpid = getpid();
rootshell = 1;