Provided by: manpages-es-dev_4.21.0-2_all bug

NOMBRE

       clearenv - limpia el entorno

BIBLIOTECA

       Biblioteca Estándar C (libc, -lc)

SINOPSIS

       #include <stdlib.h>

       int clearenv(void);

   Requisitos de Macros de Prueba de Características para glibc (véase feature_test_macros(7)):

       clearenv():
           /* glibc >= 2.19: */ _DEFAULT_SOURCE
               || /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE

DESCRIPCIÓN

       The  clearenv()   function  clears  the  environment  of  all  name-value pairs and sets the value of the
       external variable environ to NULL.  After this call, new variables can be added to the environment  using
       putenv(3)  and setenv(3).

VALOR DEVUELTO

       La función clearenv() devuelve cero en caso de éxito, y un valor distinto de cero en caso de fallo.

VERSIONES

       Available since glibc 2.0.

ATRIBUTOS

       Para obtener una explicación de los términos usados en esta sección, véase attributes(7).
       ┌────────────────────────────────────────────────────────────┬────────────────────┬─────────────────────┐
       │ InterfazAtributoValor               │
       ├────────────────────────────────────────────────────────────┼────────────────────┼─────────────────────┤
       │ clearenv()                                                 │ Seguridad del hilo │ MT-Unsafe const:env │
       └────────────────────────────────────────────────────────────┴────────────────────┴─────────────────────┘

ESTÁNDARES

       Varias  variantes  UNIX  (DG/UX,  HP-UX,  QNX,  ...).  POSIX.9  (enlaces para FORTRAN77). POSIX.1-1996 no
       aceptaba clearenv() ni putenv(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
       putenv(3), y rechaza clearenv().

NOTAS

       On systems where clearenv()  is unavailable, the assignment

           environ = NULL;

       no está disponible probablemente lo estará.

       The  clearenv()  function may be useful in security-conscious applications that want to precisely control
       the environment that is passed to programs executed using exec(3).  The  application  would  do  this  by
       first clearing the environment and then adding select environment variables.

       Note  that the main effect of clearenv()  is to adjust the value of the pointer environ(7); this function
       does not erase the contents of the buffers containing the environment definitions.

       En las páginas de manual de DG/UX y Tru64 se puede leer: Si environ ha sido modificado por cualquier otro
       medio que no sea las funciones putenv(3), getenv(3), o clearenv() entonces clearenv() devolverá un  error
       y el entorno del proceso permanecerá intacto.

VÉASE TAMBIÉN

       getenv(3), putenv(3), setenv(3), unsetenv(3), environ(7)

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>

       Esta  traducción  es  documentación  libre;  lea  la GNU General Public License Version 3 o posterior con
       respecto a las condiciones de copyright.  No existe NINGUNA RESPONSABILIDAD.

       Si encuentra algún error en la traducción de esta página  del  manual,  envíe  un  correo  electrónico  a
       debian-l10n-spanish@lists.debian.org.

Páginas de manual de Linux 6.03                  5 Febrero 2023                                      clearenv(3)