diff options
author | Jared Yanovich <jaredy@cvs.openbsd.org> | 2009-01-29 23:27:27 +0000 |
---|---|---|
committer | Jared Yanovich <jaredy@cvs.openbsd.org> | 2009-01-29 23:27:27 +0000 |
commit | 13f12bb1515bba7e136f815e45e8748acee9e3db (patch) | |
tree | 9b4c95d9db59bd0eb01abd04d0ccbc676e5db9a2 /bin/ksh/eval.c | |
parent | 90be8e08639f88e86f264a0ef15ee046ee6b9877 (diff) |
pass "xerrok" status across the execution call stack to more closely
match what both POSIX and ksh.1 already describe in regards to set
-e/errexit's behavior in determining when to exit from nonzero return
values.
specifically, the truth values tested as operands to `&&' and `||', as
well as the resulting compound expression itself, along with the truth
value resulting from a negated command (i.e. a pipeline prefixed `!'),
should not make the shell exit when -e is in effect.
issue reported by matthieu.
testing matthieu, naddy.
ok miod (earlier version), otto.
man page ok jmc.
Diffstat (limited to 'bin/ksh/eval.c')
-rw-r--r-- | bin/ksh/eval.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/ksh/eval.c b/bin/ksh/eval.c index 0af321366bb..e9b88066a22 100644 --- a/bin/ksh/eval.c +++ b/bin/ksh/eval.c @@ -1,4 +1,4 @@ -/* $OpenBSD: eval.c,v 1.33 2007/08/02 11:05:54 fgsch Exp $ */ +/* $OpenBSD: eval.c,v 1.34 2009/01/29 23:27:26 jaredy Exp $ */ /* * Expansion - quoting, separation, substitution, globbing @@ -868,7 +868,7 @@ comsub(Expand *xp, char *cp) ksh_dup2(pv[1], 1, false); close(pv[1]); } - execute(t, XFORK|XXCOM|XPIPEO); + execute(t, XFORK|XXCOM|XPIPEO, NULL); restfd(1, ofd1); startlast(); xp->split = 1; /* waitlast() */ |