.\" -*- coding: UTF-8 -*-
'\" t
.\" Copyright 2001 John Levon <moz@compsoc.man.ac.uk>
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\" Additions, aeb, 2001-10-17.
.\"*******************************************************************
.\"
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
.TH clearenv 3 "2 Mayo 2024" "Páginas de Manual de Linux 6.9.1" 
.SH NOMBRE
clearenv \- limpia el entorno
.SH BIBLIOTECA
Biblioteca Estándar C (\fIlibc\fP, \fI\-lc\fP)
.SH SINOPSIS
.nf
\fB#include <stdlib.h>\fP
.P
\fBint clearenv(void);\fP
.fi
.P
.RS -4
Requisitos de Macros de Prueba de Características para glibc (véase
\fBfeature_test_macros\fP(7)):
.RE
.P
\fBclearenv\fP():
.nf
    /* glibc >= 2.19: */ _DEFAULT_SOURCE
        || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
.fi
.SH DESCRIPCIÓN
The \fBclearenv\fP()  function clears the environment of all name\-value pairs
and sets the value of the external variable \fIenviron\fP to NULL.  After this
call, new variables can be added to the environment using \fBputenv\fP(3)  and
\fBsetenv\fP(3).
.SH "VALOR DEVUELTO"
.\" Most versions of UNIX return -1 on error, or do not even have errors.
.\" glibc info and the Watcom C library document "a nonzero value".
La función \fBclearenv\fP() devuelve cero en caso de éxito, y un valor distinto
de cero en caso de fallo.
.SH ATRIBUTOS
Para obtener una explicación de los términos usados en esta sección, véase
\fBattributes\fP(7).
.TS
allbox;
lbx lb lb
l l l.
Interfaz	Atributo	Valor
T{
.na
.nh
\fBclearenv\fP()
T}	Seguridad del hilo	MT\-Unsafe const:env
.TE
.SH ESTÁNDARES
.TP 
\fBputenv\fP()
POSIX.1\-2008.
.TP 
\fBclearenv\fP()
None.
.SH HISTORIAL
.TP 
\fBputenv\fP()
glibc 2.0.  POSIX.1\-2001.
.TP 
\fBclearenv\fP()
glibc 2.0.
.P
Varias variantes UNIX (DG/UX, HP\-UX, QNX, ...). POSIX.9 (enlaces para
FORTRAN77). POSIX.1\-1996 no aceptaba \fBclearenv\fP() ni \fBputenv\fP(3), pero más
tarde recapacitó y planificó estas funciones para ser incluidas en una
versión posterior de su estándar (cf. B.4.6.1). Sin embargo, POSIX.1\-2001
solo incorpora \fBputenv\fP(3), y rechaza \fBclearenv\fP().
.SH NOTAS
On systems where \fBclearenv\fP()  is unavailable, the assignment
.P
.in +4n
.EX
environ = NULL;
.EE
.in
.P
no está disponible probablemente lo estará.
.P
The \fBclearenv\fP()  function may be useful in security\-conscious applications
that want to precisely control the environment that is passed to programs
executed using \fBexec\fP(3).  The application would do this by first clearing
the environment and then adding select environment variables.
.P
Note that the main effect of \fBclearenv\fP()  is to adjust the value of the
pointer \fBenviron\fP(7); this function does not erase the contents of the
buffers containing the environment definitions.
.P
.\" .P
.\" HP-UX has a ENOMEM error return.
En las páginas de manual de DG/UX y Tru64 se puede leer: Si \fIenviron\fP ha
sido modificado por cualquier otro medio que no sea las funciones
\fBputenv\fP(3), \fBgetenv\fP(3), o \fBclearenv\fP() entonces \fBclearenv\fP() devolverá
un error y el entorno del proceso permanecerá intacto.
.SH "VÉASE TAMBIÉN"
\fBgetenv\fP(3), \fBputenv\fP(3), \fBsetenv\fP(3), \fBunsetenv\fP(3), \fBenviron\fP(7)
.PP
.SH TRADUCCIÓN
La traducción al español de esta página del manual fue creada por
Miguel Pérez Ibars <mpi79470@alu.um.es>
.
.PP
Esta traducción es documentación libre; lea la
.UR https://www.gnu.org/licenses/gpl-3.0.html
GNU General Public License Version 3
.UE
o posterior con respecto a las condiciones de copyright.
No existe NINGUNA RESPONSABILIDAD.
.PP
Si encuentra algún error en la traducción de esta página del manual, envíe un
correo electrónico a
.MT debian-l10n-spanish@lists.debian.org
.ME .
