clear the process environment area
int clearenv( void ); #include <env.h>
The clearenv() function clears the process environment area. No environment variables are defined immediately after a call to it. Note that this clears the following environment variables, which may then affect the operation of other library functions:
The clearenv() function may manipulate the value of the pointer environ.
errno, exec... functions, getenv(), putenv(), _searchenv(), searchenv(), setenv(), spawn... functions, system()
The following example clears the entire environment area and sets up a new TZ environment variable.
#include <env.h> void main() { clearenv(); setenv( "TZ", "EST5EDT", 0 ); }
POSIX 1003.1
All (except Netware, DOS/PM)