man pages section 3: Basic Library Functions

Exit Print View

Updated: July 2014
 
 

clearenv(3C)

Name

clearenv - clear the environment

Synopsis

#include <stdlib.h>

int clearenv(void);

Description

The clearenv() function clears the environment of all name-value pairs and sets the value of the external variable environ(5) to NULL.

Return Values

Upon successful completion, the clearenv() function returns 0. Otherwise, it returns a non-zero value.

Attributes

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Interface Stability
Committed
MT-Level
MT-Safe

See also

getenv(3C), setenv(3C), attributes(5), environ(5)