DASH Shell discussions
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: dash@vger.kernel.org
Subject: Re: [PATCH] [EVAL] with set -e exit the shell if a subshell exits non-zero
Date: Mon, 28 Jun 2010 17:02:31 +1000	[thread overview]
Message-ID: <20100628070231.GA26558@gondor.apana.org.au> (raw)
In-Reply-To: <20100614095603.27834.qmail@728ec0bb900c60.315fe32.mid.smarden.org>

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 <pape@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 <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

  reply	other threads:[~2010-06-28  7:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-14  9:56 [PATCH] [EVAL] with set -e exit the shell if a subshell exits non-zero Gerrit Pape
2010-06-28  7:02 ` Herbert Xu [this message]
2010-06-28  7:22   ` Cristian Ionescu-Idbohrn
2010-06-28 13:16     ` Eric Blake
2010-07-05  8:26       ` Herbert Xu
2010-07-06  9:51 ` Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100628070231.GA26558@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=dash@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox