bug-coreutils
[Top][All Lists]
Advanced

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

Re: env -u behavior


From: Eric Blake
Subject: Re: env -u behavior
Date: Fri, 23 Oct 2009 20:33:01 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]