From a92255d6fa8b8efb0f9fb093b77ac601fe3e9ede Mon Sep 17 00:00:00 2001 From: Gerrit Pape Date: Tue, 6 Jul 2010 17:50:37 +0800 Subject: [EVAL] Check exit for eval NSUBSHELL Example: $ dash -c 'set -e; (false); echo here' here With this commit, dash exits 1 before echo. The bug was reported by Stefan Fritsch through http://bugs.debian.org/514863 Signed-off-by: Gerrit Pape Signed-off-by: Herbert Xu --- ChangeLog | 4 ++++ src/eval.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 3f5e24c..0e367a6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-07-06 Gerrit Pape + + * Check exit for eval NSUBSHELL. + 2010-07-06 Herbert Xu * Fix loss of variables when hash collides. diff --git a/src/eval.c b/src/eval.c index 58739f5..5b8d36b 100644 --- a/src/eval.c +++ b/src/eval.c @@ -251,7 +251,7 @@ checkexit: case NSUBSHELL: case NBACKGND: evalfn = evalsubshell; - goto calleval; + goto checkexit; case NPIPE: evalfn = evalpipe; goto checkexit; -- cgit 1.4.1