English pages are provided only to compare translations to original pages,
better looking pages can be browsed
at the Linux man-pages official site.
Linux Programmer's Manual (3)
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.66 of the Linux
A description of the project,
information about reporting bugs,
and the latest version of this page,
can be found at
- RETURN VALUE
- CONFORMING TO
- SEE ALSO
This document was created by
using the manual pages.
Time: 21:42:59 GMT, July 12, 2014