Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Oct 2002 23:53:32 -0400 (EDT)
From:      Garrett Wollman <wollman@lcs.mit.edu>
To:        Tony Finch <dot@dotat.at>
Cc:        freebsd-standards@FreeBSD.ORG
Subject:   Re: /usr/posix: a first cut
Message-ID:  <200210270353.g9R3rWRM027241@khavrinen.lcs.mit.edu>
In-Reply-To: <20021027032512.A27342@chiark.greenend.org.uk>
References:  <200210262036.g9QKadk2025534@khavrinen.lcs.mit.edu> <200210262115.g9QLFeCw014715@dotar.thuvia.org> <200210262224.g9QMO4pw026010@khavrinen.lcs.mit.edu> <20021027032512.A27342@chiark.greenend.org.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
<<On Sun, 27 Oct 2002 03:25:12 +0000, Tony Finch <dot@dotat.at> said:

> As far as I can tell you have to explicitly put /usr/xpg4/bin in your
> path on Solaris in order to get post-1980s behaviour, and it will not
> do that for you by default.

`getconf PATH' reports it as first, so a script (or more likely an
installation program) can use that to find where the Proper Shell
really lives.  Other programs which might care about the standard path
are supposed to call confstr(_CS_PATH) to find it, but may well be
broken.  (This is, by the way, one of the reasons why the `#!' hack is
not and likely never will be standardized.)

> Coding "portably" (i.e. coding to standards) is all very well, but it
> does not mean that your code will run on lots of systems. If you want to
> write a script that will run on many unices then you have to code to the
> 7th Edition.

Actually, if you really want to go back that far into ancient history,
you would have to code for the intersection of V7 and every official
and unofficial standard released since then.  (That means, among other
things, protecting your `expr' command arguments from undesired
alternative interpretations.  Let's please keep in mind that
-current's `expr' now for the first time conforms to a TEN-YEAR-OLD
STANDARD, 1003.2-1992.)

> FreeBSD should remain compatible with that

It never has been, since our shell makes at least an attempt at
accepting the POSIX grammar, of which the V7 shell language is not a
proper subset.  I'm not sure if Tom Duff's comment on the original
Bourne shell language[1] doesn't still apply.

-GAWollman

[1] ``This is surely an oversight, but it suggests something darker:
Nobody really knows what the Bourne shell's grammar is.  Even
examination of the source code is little help.''


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-standards" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200210270353.g9R3rWRM027241>