Marcin Owsiany <[EMAIL PROTECTED]> wrote:
> On Mon, Oct 06, 2008 at 09:22:30AM -0400, Chet Ramey wrote:
>> This bug only occurs when errexit is enabled and the final element of a
>> pipeline is a simple command that returns a non-zero exit status.
>
> Well, if the final element in the pipeline is a simple command, all
> works as is supposed to.

No.  It works the way you want it to, but not the way SUS says it
should.

> When it's a-not-so-simple command, like a for or while loop, then it
> does not terminate the parent.

That's the case that's behaving correctly, even though it's not the
way you want it to behave.  Neither case should terminate the shell.
Only a simple command should terminate the shell, and a pipeline is
not a simple command, even if its components are.  Chet is saying that
the next bash release will fix this bug - meaning that "true | false"
will no longer cause the shell to exit.


paul


Reply via email to