Re: Exit errors by subshells are ignored in most shells
From: Stephane CHAZELAS (this.address_at_is.invalid)
Date: 06/04/04
- Next message: Stephane CHAZELAS: "Re: sed: finding all % not preceded by \"
- Previous message: spaz: "sending variables to expect from ksh script"
- In reply to: Chet Ramey: "Re: Exit errors by subshells are ignored in most shells"
- Next in thread: Kenny McCormack: "Re: Exit errors by subshells are ignored in most shells"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 4 Jun 2004 07:24:42 +0000
2004-06-3, 18:46(+00), Chet Ramey:
> In article <barmar-221EE3.15452802062004@comcast.dca.giganews.com>,
> Barry Margolin <barmar@alum.mit.edu> wrote:
>
>>I've always interpreted that as meaning that it won't terminate the
>>parent shell if an individual command in a complex command has a
>>non-zero termination status. But if the termination status of the
>>entire complex command is non-zero, I think the -e setting should be
>>followed.
>
> You might think that, but that's not what posix says. set -e is only
> honored for simple commands, and only in certain contexts.
Which you'd agree is nonsense, don't you? Note that it can be
interpreted other ways (see URL referenced below).
In much cases the POSIX shell specification is nonsense just
because it trys to cope with compatibility with Bourne/Korn
shell. But, here, what's the point in specifying a non-intuitive
behavior that is not even backward compatible with Bourne shell?
See:
http://groups.google.com/groups?selm=slrnb42euq.14j.stephane_chazelas%40pcchazelas.free.fr
and the whole thread.
-- Stephane
- Next message: Stephane CHAZELAS: "Re: sed: finding all % not preceded by \"
- Previous message: spaz: "sending variables to expect from ksh script"
- In reply to: Chet Ramey: "Re: Exit errors by subshells are ignored in most shells"
- Next in thread: Kenny McCormack: "Re: Exit errors by subshells are ignored in most shells"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|