CLEARENV(3C) Standard C Library Functions CLEARENV(3C)

clearenvclear environment

#include <stdlib.h>

int
clearenv(void);

The () function clears the contents of the environment. All environment variables in the calling process are removed as though the function unsetenv(3C) had been called on every environment variable. Until subsequent calls to putenv(3C) or setenv(3C) are made, calls to getenv(3C) will always return .

Upon successful completion, clearenv() returns . Otherwise, it returns a non-zero value and sets to indicate the error. At this time, no errors are defined for clearenv(), it will always succeed. Portable applications should always check the return value of clearenv().

No errors are defined.

.

.

getenv(3C), setenv(3C), unsetenv(3C), attributes(7), environ(7), standards(7)

December 20, 2014 OmniOS