Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Jun 2005 19:41:03 +1000
From:      Tim Robbins <tjr@freebsd.org>
To:        Garance A Drosehn <gad@FreeBSD.org>
Cc:        cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/usr.bin/env env.c
Message-ID:  <20050620094103.GB54301@cat.robbins.dropbear.id.au>
In-Reply-To: <200506200314.j5K3EUtt089472@repoman.freebsd.org>
References:  <200506200314.j5K3EUtt089472@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jun 20, 2005 at 03:14:29AM +0000, Garance A Drosehn wrote:
> gad         2005-06-20 03:14:29 UTC
> 
>   FreeBSD src repository
> 
>   Modified files:
>     usr.bin/env          env.c 
>   Log:
>   If the `utility' specified starts with a '/' character, then execute it
>   without checking it for an equals-sign.  If it starts with a slash, then
>   it cannot be a request to set the value of a valid environment variable.
>   
>   Approved by:    re (blanket `env')

This is not strictly correct:

	The value of an environment variable is a string of characters.
	For a C-language program, an array of strings called the
	environment shall be made available when a process begins. The
	array is pointed to by the external variable environ, which is
	defined as:

	extern char **environ;

	These strings have the form name=value; names shall not contain
	the character '='. For values to be portable across systems
	conforming to IEEE Std 1003.1-2001, the value shall be composed
	of characters from the portable character set (except NUL and as
	indicated below). There is no meaning associated with the order
	of strings in the environment. If more than one string in a
	process' environment has the same name, the consequences are
	undefined.

(The Open Group Base Specifications Issue 6, section 8.1)

Also, please be careful when adding new non-standard options and features;
they tend to stick around forever.


Tim



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050620094103.GB54301>