bug-coreutils
[Top][All Lists]
Advanced

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

Re: env -u behavior


From: Mike Frysinger
Subject: Re: env -u behavior
Date: Sat, 24 Oct 2009 02:16:13 -0400
User-agent: KMail/1.12.2 (Linux/2.6.31.4; KDE/4.3.2; x86_64; ; )

On Friday 23 October 2009 16:33:01 Eric Blake wrote:
> 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).

eh ?  my installed coreutils-7.6 (as well as a quick test of 8.0) does the 
right thing according to POSIX -- it sets "a" to "b" and executes `true`.

> Do we go ahead and call this a bug, and fix it?  Or is it obscure enough to
> wrap in POSIXLY_CORRECT?

i dont think this is obscure.  setting env vars are not options.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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