getenv semantics

Joseph Koshy joseph.koshy at gmail.com
Sat Oct 15 22:54:22 PDT 2005


> Is this analysis correct?  Can someone point me to the (a?)
> standard that describes this.  The FreeBSD behaviour makes
> sense, I am trying to understand what is the expected
> behaviour on other platforms.

>From "The Open Group Base Specifications Issue 6"
http://www.cnop.net/docs/susv3/functions/getenv.html

"The getenv() function shall search the environment of the
 calling process (see the Base Definitions volume of IEEE Std
 1003.1-2001, Chapter 8, Environment Variables) for the
 environment variable name if it exists and return a pointer to
 the value of the environment variable. If the specified
 environment variable cannot be found, a null pointer shall be
 returned."

--
FreeBSD Volunteer,     http://people.freebsd.org/~jkoshy


More information about the freebsd-hackers mailing list