HP-UX Reference (11i v1 00/12) - 3 Library Functions A-M (vol 6)
__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man3/!!!intro.3c
________________________________________________________________
___ ___
c
clearenv(3C) clearenv(3C)
NAME
clearenv - clear the process environment
SYNOPSIS
#include <stdlib.h>
int clearenv(void);
DESCRIPTION
clearenv() clears the process environment. No environment variables are defined immediately after a
call to clearenv() .
clearenv() modifies the value of the pointer environ. This means that copies of that pointer are invalid
after a call to clearenv() .
APPLICATION USAGE
clearenv() is thread-safe. It is not async-cancel-safe.
RETURN VALUE
Upon successful completion, clearenv() returns zero; otherwise, it returns −1 and sets
errno to indi-
cate the error.
ERRORS
clearenv() fails if the following condition is encountered:
[ENOMEM] Failed to free or reallocate memory for the process environment.
SEE ALSO
environ(5), getenv(3C), putenv(3C), <stdlib.h>.
STANDARDS CONFORMANCE
clearenv(): AES
Section 3−−70 − 1 − HP-UX Release 11i: December 2000
___
___