clearenv

Clears all environment variables.

Library:LibC
Classification:Other
Service:Environment Variable

Syntax

  #include <stdlib.h> 
   
  int clearenv ( void );
  

Return Values

If successful, returns 0. Otherwise, returns -1 and sets errno to the following:

Decimal

Constant

Description

105

ENOCONTEXT

No thread context is present.

Remarks

The clearenv function removes all name-value pairs, which can affect the operation of other library functions.

See Also