CLEARENV(3C) | Standard C Library Functions | CLEARENV(3C) |
clearenv
— clear
environment
#include
<stdlib.h>
int
clearenv
(void);
The
clearenv
()
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
NULL.
Upon successful completion, clearenv
()
returns 0.
Otherwise, it returns a non-zero value and sets
errno 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 |