From 7f684260a2426ac61c06d2e4822429b00437ae24 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Thu, 7 Oct 2010 10:55:15 +0800 Subject: [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 --- src/eval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/eval.c b/src/eval.c index 5b8d36b..b966749 100644 --- a/src/eval.c +++ b/src/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; -- cgit 1.4.1