Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin/sh Backtrack `exitstatus' to make the shell really ignor...
details: https://anonhg.NetBSD.org/src/rev/a52adc5ff821
branches: trunk
changeset: 477089:a52adc5ff821
user: pk <pk%NetBSD.org@localhost>
date: Sun Oct 10 21:22:24 1999 +0000
description:
Backtrack `exitstatus' to make the shell really ignore the status
of `tested commands' as in this example:
set -e
true; false && echo "not reached"
diffstat:
bin/sh/eval.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r 3ae731951363 -r a52adc5ff821 bin/sh/eval.c
--- a/bin/sh/eval.c Sun Oct 10 18:52:03 1999 +0000
+++ b/bin/sh/eval.c Sun Oct 10 21:22:24 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: eval.c,v 1.47 1999/07/09 03:05:49 christos Exp $ */
+/* $NetBSD: eval.c,v 1.48 1999/10/10 21:22:24 pk Exp $ */
/*-
* Copyright (c) 1993
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)eval.c 8.9 (Berkeley) 6/8/95";
#else
-__RCSID("$NetBSD: eval.c,v 1.47 1999/07/09 03:05:49 christos Exp $");
+__RCSID("$NetBSD: eval.c,v 1.48 1999/10/10 21:22:24 pk Exp $");
#endif
#endif /* not lint */
@@ -210,6 +210,7 @@
evaltree(n->nbinary.ch1, EV_TESTED);
if (evalskip || exitstatus != 0) {
/* don't bomb out on "set -e; false && true" */
+ exitstatus = oexitstatus;
flags |= EV_TESTED;
goto out;
}
Home |
Main Index |
Thread Index |
Old Index