Re: wrong behaviour when unsetting/setting some variables

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

 



On Tue, Feb 27, 2024, at 12:11 AM, Christoph Anton Mitterer wrote:
> OTOH, 8.1 Environment Variable Definition says:
>> The array is pointed to by the external variable environ, which is
>> defined as:
>> extern char **environ;
>> These strings have the form name=value;
>
> So one might argue, that env vars must have some =value, and that this
> couldn't be done for exported shell vars with no (not even the empty)
> value.

That's my understanding:  Environment variables must have values
(even empty ones), so unset shell variables cannot be placed into
the environment.  One might propose that a valueless environment
variable could be represented as "name", but the standard requires
that environment strings contain a "=".

-- 
vq




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux