Subject: Re: make -j and failure modes
To: Greywolf <greywolf@starwolf.com>
From: Ben Harris <bjh21@NetBSD.org>
List: tech-userlevel
Date: 12/10/2003 22:41:03
On Wed, 10 Dec 2003, Greywolf wrote:

> Am I understanding from your inference, then, that POSIX has changed
> the behaviour of -e as applied to () at some point?

Well, it's defined -e as not applying to compound commands (of which ()
groups are one type) since IEEE Std 1003.2-1992, which I think is the
first release of the shell and utilities bit, so it's never changed
internally, but it does appear to have diverged from historical precedent.
Surprisingly, there's no mention of this in the Rationale, which leads me
to suspect that either the change was an accident, or it was considered to
be so obviously correct that no-one thought it worth mentioning.

> If that's the case,
> then I don't know of a single vendor with a POSIX compliant shell.

Well, in this regard Bash seems to follow the standard, and is shipped as
"sh" in some commercial systems.  There are areas (command searching, for
instance) where I think _everyone_ diverges from the standard, but this
isn't one.

> If
> we're POSIX-compliant, I'll shut up, but I'll add that most people who
> use make have made assumptions about sh's "old" behaviour while writing
> their makefiles.

I suspect that most people will assume Make's default (and
POSIX-standardised) behaviour (one shell environment per command line) as
well, so they'll be likely to be confused by "make -j" anyway.  It's more
the authors of shell scripts that I'd worry about.

> Shrug and ignore, if you must.  I'm not looking for a war, I'm just
> making some observations.

Sorry.  I hadn't intented to be rude (well, no more than I usually am).  I
just couldn't remember whether saying "POSIX" in your direction would be
likely to be productive.

-- 
Ben Harris                                                   <bjh21@NetBSD.org>
Portmaster, NetBSD/acorn26           <URL:http://www.NetBSD.org/Ports/acorn26/>