Section: Linux Programmer's Manual (3)
Return to Main Contents
clearenv - clear the environment
Feature Test Macro Requirements for glibc (see
_SVID_SOURCE || _BSD_SOURCE
function clears the environment of all name-value
pairs and sets the value of the external variable
function returns zero on success, and a nonzero
value on failure.
Not in libc4, libc5.
In glibc since glibc 2.0.
Various UNIX variants (DG/UX, HP-UX, QNX, ...).
POSIX.9 (bindings for FORTRAN77).
POSIX.1-1996 did not accept
but changed its mind and scheduled these functions for some
later issue of this standard (cf. B.4.6.1).
Used in security-conscious applications.
If it is unavailable
environ = NULL;
will probably do.
The DG/UX and Tru64 man pages write: If
has been modified by anything other than the
will return an error and the process environment will remain unchanged.
This page is part of release 3.54 of the Linux
A description of the project,
and information about reporting bugs,
can be found at
- RETURN VALUE
- CONFORMING TO
- SEE ALSO
This document was created by
using the manual pages.
Time: 02:56:47 GMT, January 21, 2018