CLEARENV(3C) Standard C Library Functions CLEARENV(3C)
NAME
clearenv - clear environment
SYNOPSIS
#include <stdlib.h> int clearenv(
void);
DESCRIPTION
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.
RETURN VALUES
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().
ERRORS
No errors are defined.
INTERFACE STABILITY
Committed.
MT-LEVEL Mt-Safe.
SEE ALSO
getenv(3C),
setenv(3C),
unsetenv(3C),
attributes(7),
environ(7),
standards(7)illumos December 20, 2014 illumos