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 <p...@smarden.org>
---
 src/eval.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/eval.c b/src/eval.c
index 439f881..a0d0f3b 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -251,6 +251,8 @@ checkexit:
        case NSUBSHELL:
        case NBACKGND:
                evalfn = evalsubshell;
+               if (eflag && !(flags & EV_TESTED))
+                       checkexit = ~0;
                goto calleval;
        case NPIPE:
                evalfn = evalpipe;
-- 
1.6.0.3

--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to