[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: bug report dispute resolution request

On Wed, Dec 13, 2000 at 09:22:38PM +0000, Ian Jackson wrote:
> Having said that, I think the SuS doesn't completely support Herbert's
> view.  Just at the end of the section on command expansion we see:
>   If the command substitution consists of a single subshell, such as: 
>        $( (command) )
>   a portable application must separate the $( and "(" into two tokens
>   (that is, separate them with white space).  This is required to
>   avoid any ambiguities with arithmetic expansion.
> The phrase `single subshell' seems to suggest that it's intended only
> to forbid to things like
>        $((command | othercommand))
> and not
>        $((command | othercommand) > file)
>        $((command | othercommand) && (command | othercommand))
> and the like.  Indeed, only the former is ambiguous when the whole
> expression is taken.  This - together with the qualification on the
> requirement to use `$( (' instead of `$((', which could have been
> unqualified - seems to suggest to me that the SuS intends
> the shell to be able to parse any unambiguous expression, even if this
> means possible backtracking.

This is indeed a possible interpretation.  However, it is only an example,
and I would be reluctant to draw from it the intended behaviour of the shell.

> Herbert, is it - in your opinion as ash maintainer, or the opinion of
> the upstream authors - a part of the the spec for ash that it is
> supposed to support POSIX (let us assume that SuS and POSIX don't
> differ on this point) ?

Yes, it is the goal of the NetBSD ash maintainers to conform to POSIX.
It is our goal as well since that would allow ash to serve as our /bin/sh.
Nevertheless, I still hold the view that this behaviour is allowed by
the standards.

Is it possible to ask for a ruling by OpenGroup on an issue like this?
Debian GNU/Linux 2.2 is out! ( http://www.debian.org/ )
Email:  Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Reply to: