Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ clearenv(3C) — HP-UX ANSI C A.09.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

environ(5)

getenv(3C)

putenv(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(). 

RETURN VALUE

Upon successful completion, clearenv() returns zero; otherwise, it returns −1 and sets errno to indicate 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

Hewlett-Packard Company  —  HP-UX Release 9.0: August 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026