Eric Blake <ebb9 <at> byu.net> writes:
> Is 'env -i -u a=b' really supposed to output a=b, or should it be an error
> (because a=b is not a valid environment name)? Right now, it is the former,
> because we are using putenv() to remove variables from environ, rather than
> unsetenv(). Similarly, should env -u '' issue an error?
Also, if I'm reading POSIX correctly,
env -- a=b true
is supposed to execute true with a=b in the environment, rather than GNU
behavior of executing ./a=b (POSIX says to use 'env ./a=b true' to get similar
behavior). But POSIX and GNU at least agree that:
env -- -i a=b
executes ./-i a=b, rather than printing "a=b".
Do we go ahead and call this a bug, and fix it? Or is it obscure enough to
wrap in POSIXLY_CORRECT?
--
Eric Blake