summaryrefslogtreecommitdiffstats
path: root/bin/sh/main.c
diff options
context:
space:
mode:
authorstefanf <stefanf@FreeBSD.org>2009-05-31 12:36:14 +0000
committerstefanf <stefanf@FreeBSD.org>2009-05-31 12:36:14 +0000
commit08e3c7d596923f5022fda6ee58d6e7ac15e65edb (patch)
tree84ae7f42c94dccd7867ba1799d70fb266b79ea38 /bin/sh/main.c
parent6fb0275352a53e468de58a1124fc5b35e9234143 (diff)
downloadFreeBSD-src-08e3c7d596923f5022fda6ee58d6e7ac15e65edb.zip
FreeBSD-src-08e3c7d596923f5022fda6ee58d6e7ac15e65edb.tar.gz
Fix the eval command in combination with set -e. Before this change the shell
would always terminate if eval returned with a non-zero exit status regardless if the status was actually tested. Unfortunately a new file-scope variable is needed, the alternative would only be to add a new parameter to all built-ins. PR: 134881
Diffstat (limited to 'bin/sh/main.c')
-rw-r--r--bin/sh/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/sh/main.c b/bin/sh/main.c
index e77ff4e..77526b5 100644
--- a/bin/sh/main.c
+++ b/bin/sh/main.c
@@ -178,7 +178,7 @@ state2:
state3:
state = 4;
if (minusc) {
- evalstring(minusc);
+ evalstring(minusc, 0);
}
if (sflag || minusc == NULL) {
state4: /* XXX ??? - why isn't this before the "if" statement */
OpenPOWER on IntegriCloud