On 1/27/22 12:07 PM, Harald van Dijk via austin-group-l at The Open Group wrote:
On 27/01/2022 16:06, Chet Ramey via austin-group-l at The Open Group wrote:
Wow, that seems like a bug. Environment variables can contain sequences of
arbitrary non-NULL bytes, and, as long as the portion before the `=' is a
valid NAME, the shell is required to create a variable with the remainder
of the string as its value and pass it to child processes in the
environment.

That is not what POSIX says. It says "The value of an environment variable is a string of characters" (8.1 Environment Variable Definition), and "character" is defined as "a sequence of one or more bytes representing a single graphic symbol or control code" (3 Definitions), with a note that says it corresponds to what C calls a multi-byte character. Environment variables are not specified to allow arbitrary bytes.

I wonder why they chose that. It's a departure from existing practice.


--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/

  • does POSIX m... Christoph Anton Mitterer via austin-group-l at The Open Group
    • Re: doe... Geoff Clare via austin-group-l at The Open Group
      • Re:... Christoph Anton Mitterer via austin-group-l at The Open Group
        • ... Geoff Clare via austin-group-l at The Open Group
          • ... Harald van Dijk via austin-group-l at The Open Group
            • ... Chet Ramey via austin-group-l at The Open Group
              • ... Harald van Dijk via austin-group-l at The Open Group
                • ... Chet Ramey via austin-group-l at The Open Group
                • ... Chet Ramey via austin-group-l at The Open Group
                • ... Christoph Anton Mitterer via austin-group-l at The Open Group
                • ... Harald van Dijk via austin-group-l at The Open Group
            • ... Geoff Clare via austin-group-l at The Open Group
              • ... Harald van Dijk via austin-group-l at The Open Group
                • ... Christoph Anton Mitterer via austin-group-l at The Open Group
                • ... Harald van Dijk via austin-group-l at The Open Group
            • ... Christoph Anton Mitterer via austin-group-l at The Open Group
              • ... Harald van Dijk via austin-group-l at The Open Group
          • ... Christoph Anton Mitterer via austin-group-l at The Open Group

Reply via email to