bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: -e doesn't work in subshells


From: Brandon S. Allbery KF8NH
Subject: Re: -e doesn't work in subshells
Date: Mon, 22 Jan 2001 12:46:42 -0500

On Monday, January 22, 2001 11:15:21 -0500, Chet Ramey <chet@nike.INS.CWRU.Edu> wrote:
+-----
| > On Monday, January 22, 2001 10:31:40 -0500, Chet Ramey
| > <chet@nike.INS.CWRU.Edu> wrote:
| > +-----
| > | >   "set -e" does not abort the entire script when used inside a
| > | >   parenthesized subshell; it only aborts the subshell.
| > |
| > | It's not supposed to.  POSIX.2 says that `set -e' causes the shell to
| exit > | only if a simple command fails under certain circumstances
| (enumerated in > | the bash man page).  A parenthesized subshell is not a
| simple command. > +--->8
| >
| > But in fact, no shell other than bash that I can find restricts -e to
| that  > subset
|
| You should have checked ksh93, the other shell which claims POSIX
| compliance:
+--->8

That's nice. This is still more important than breaking lots of Makefiles on Linux, though?

Fine, local patches and shell replacement it is.

--
brandon s. allbery     [os/2][linux][solaris][japh]   allbery@kf8nh.apk.net
system administrator        [WAY too many hats]         allbery@ece.cmu.edu
electrical and computer engineering                                   KF8NH
carnegie mellon university     ["better check the oblivious first" -ke6sls]




reply via email to

[Prev in Thread] Current Thread [Next in Thread]