aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2010-10-07 10:55:15 +0800
committermaximilian attems <max@stro.at>2011-06-03 18:44:13 +0200
commit355bacf9ea94ac11cd3f730a0372aadc606e8055 (patch)
treeb8e2413f8e9e11a336fba29cfa6b8e85f6e051f0
parent4dea851664630da8d688de9cc3bdd7d6a853af08 (diff)
downloadklibc-355bacf9ea94ac11cd3f730a0372aadc606e8055.tar.gz
[klibc] [BUILTIN] Fix EXEXEC status clobbering
evalcommand always clobbers the exit status in case of an EXEXEC which means that exec always fails with exit status 2 regardless of what it actually returns. This patch adds the missing check for EXEXEC so that the correct exit status is preserved. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: maximilian attems <max@stro.at>
-rw-r--r--usr/dash/eval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr/dash/eval.c b/usr/dash/eval.c
index 6947ba26bf13cf..cb331ebeda86e5 100644
--- a/usr/dash/eval.c
+++ b/usr/dash/eval.c
@@ -854,7 +854,7 @@ bail:
int i;
i = exception;
- if (i == EXEXIT)
+ if (i == EXEXIT || i == EXEXEC)
goto raise;
status = (i == EXINT) ? SIGINT + 128 : 2;