summary refs log tree commit diff
diff options
context:
space:
mode:
authorGerrit Pape <pape@smarden.org>2010-07-06 17:50:37 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2010-07-06 17:50:37 +0800
commita92255d6fa8b8efb0f9fb093b77ac601fe3e9ede (patch)
treec89a6a271bd51fa377dc7e93b2d0154c9c68e6cb
parent[EVAL] Removed dead code for eval NPIPE (diff)
downloaddash-a92255d6fa8b8efb0f9fb093b77ac601fe3e9ede.tar.gz
dash-a92255d6fa8b8efb0f9fb093b77ac601fe3e9ede.zip
[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 <pape@smarden.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to '')
-rw-r--r--ChangeLog4
-rw-r--r--src/eval.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 3f5e24c..0e367a6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-07-06  Gerrit Pape <pape@smarden.org>
+
+	* Check exit for eval NSUBSHELL.
+
 2010-07-06  Herbert Xu <herbert@gondor.apana.org.au>
 
 	* 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;