Subject: Re: make -j and failure modes
To: None <>
From: Alan Barrett <>
List: tech-userlevel
Date: 12/11/2003 13:31:05
On Thu, 11 Dec 2003, Robert Elz wrote:
> That is, in normal arithmetic, if someone told you that
> 	4 + 3
> could somehow do something different from
> 	(4 + 3)
> you'd be amazed.

Yes.  And, for similar reasons, I'd be amazed if somebody said that

	sh -e -c 'false; echo foo'
	sh -e -c '(false); echo foo'

should behave differently.  But you, and POSIX, seem to be saying that
they should.

> Note this is not inserting ()'s into an expression (changing "4 + 3 * 2"
> into "(4 + 3) * 2") - only putting ()'s around a whole command.
> But that's just what you're suggesting should apply to the shell.

No, that's what *you* are suggesting should apply to the shell.

What I have learned from this discussion is that the behaviour of sh -e
is either so vaguely defined or so counter-intuitively defined or so
inconsistently implemented that portable scripts and makefiles should
not rely on it.

--apb (Alan Barrett)