dash  

Re: [PATCH] [EVAL] with set -e exit the shell if a subshell exits non-zero

Herbert Xu
Mon, 28 Jun 2010 00:02:52 -0700

On Mon, Jun 14, 2010 at 09:56:03AM +0000, Gerrit Pape wrote:
> 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>

I'm not convinced that this change is necessary.  I've run some
tests and bash/pdksh both behave like dash, while ksh93 behaves
in the way you suggest.

Has bash's behaviour changed recently (I'm using an ancient
version)?

Cheers,
-- 
Email: Herbert Xu <herb...@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
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