| |||
| Home > The C and C++ libraries > getenv() | |||
This is the standard C library getenv() function
from stdlib.h. It gets the value of a specified environment
variable.
The default implementation returns NULL,
indicating that no environment information is available.
If you re-implement getenv(), it is recommended
that you re-implement it in such a way that it searches some form
of environment list for the input string, .
The set of environment names and the method for altering the environment
list are implementation-defined. namegetenv() does
not depend on any other function, and no other function depends
on getenv().
A function closely associated with getenv() is _getenv_init(). _getenv_init() is
called during startup if it is defined, to enable a user re-implementation
of getenv() to initialize itself.