tech-userlevel archive

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

Re: bin/47597: local and $() don't play well with each other



    Date:        Tue, 26 Feb 2013 14:07:33 +0100
    From:        tlaronde%polynum.com@localhost
    Message-ID:  <20130226130733.GA6007%polynum.com@localhost>

  | Well, I'm not a "SUS expert", but I fail to see in which way NetBSD sh
  | differs from SUS specification.

You're looking at the wrong part...   It isn't 2.14 that is the issue, it
is 2.9.5

  | echo in NetBSD sh is a builtin but is _not_ a special-builtin

Sure, but echo isn't the issue, it is the function call.

  | I guess that ksh makes permanent assignments for
  | all builtins and not _only_ the special ones.

It would be horribly broken if it did, but it doesn't (applied
directly to echo ksh does exactly what it should do).

The question is this part (2.9.5) ...

        When a function is executed, it shall have the syntax-error and
        variable-assignment properties described for special built-in
        utilities

The "variable assignment properties described for special built-in
utilities" means (or includes) the (now) oft quoted sentence from 2.14,
that "Variable assignments specified with special built-in utilities
remain in effect ...".

That's what NetBSD's shell does not do (and ksh does).   But please
note, this is not a bug report, I want the NetBSD shell to remain the
way it is, the SUS version (and ksh) is just plain brain dead.

kre



Home | Main Index | Thread Index | Old Index