Stephane CHAZELAS <stephane.chaze...@gmail.com> wrote:

> I reported 3 as that was the first 3 I tested:
>
> $ a=1 ./sh -o posix -c 'a=2; printenv a'
> 1
>
> POSIX requires 2 to be output there (assuming printenv a command
> to print the value of a given environment variable).

Do you have a pointer to the related text?

I did not change the Bourne Shell behavior as I believe that the 
export behavior is compatibile with POSIX and as this behavior is more useful 
than what other shells do.

> $ ./sh -o posix -c 'a=1; { a=2; } < /dev/null; echo "$a"'
> 1
>
> Again 2 required by POSIX.

I have to check the reason for that...

> $ a=1::2: ./sh -o posix -f -c 'IFS=:; printf "<%s>\n" $a'
> <1>
> <2>
>
> POSIX requires:
>
> <1>
> <>
> <2>

This is the only problem I remember to have received from you so far.
It seems that the field separation changes introduced a years ago have been 
buggy.

> > has been verified to correctly work as the system shell (/bin/sh) on 
> > Gentoo Linux in case that it was compiled with -DDO_POSIX_SH
>
> Do you mean that you have tested all the scripts ever written
> for gentoo and verified that they worked as expected?

Well, if the system comes up to multi user and is otherwise OK and with no 
warning or error, this seems to be a fairly good coverage. 

On OpenSolaris, things have been easier:

-       All scripts have been known to be Bourne Shell compatible
        before April 2010

-       After April 2010, a number of scripts have been changed to use ksh93
        syntay, so I needed to change these scripts to require no more than
        what POSIX grants in order to make bosh the system shell for SchilliX.

What I had to do to come to that point was to support /bin/sh as automatic 
POSIX enabler, add support for "local" and implement the IFS field splitting as 
done by ksh88 after I assumed to be ready.

Jörg

-- 
 EMail:jo...@schily.net                    (home) Jörg Schilling D-13353 Berlin
    joerg.schill...@fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/
 URL: http://cdrecord.org/private/ http://sf.net/projects/schilytools/files/'

Reply via email to