.\" -*- coding: UTF-8 -*- .\" Copyright 2001 John Levon .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\" Additions, aeb, 2001-10-17. .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH CLEARENV 3 "15 Septiembre 2017" Linux "Manual del Programador de Linux" .SH NOMBRE clearenv \- limpia el entorno .SH SINOPSIS .nf \fB#include \fP .PP \fBint clearenv(void);\fP .fi .PP .RS -4 Requisitos de Macros de Prueba de Características para glibc (véase \fBfeature_test_macros\fP(7)): .RE .PP \fBclearenv\fP(): /* Glibc since 2.19: */ _DEFAULT_SOURCE || /* Glibc versions <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE .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 VERSIONES Available since glibc 2.0. .SH ATRIBUTOS Para obtener una explicación de los términos usados en esta sección, véase \fBattributes\fP(7). .TS allbox; lb lb lb l l l. Interfaz Atributo Valor T{ \fBclearenv\fP() T} Seguridad del hilo MT\-Unsafe const:env .TE .sp 1 .SH "CONFORME A" 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 .PP .in +4n .EX environ = NULL; .EE .in .PP no está disponible probablemente lo estará. .PP 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. .PP 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. .PP .\" .LP .\" 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) .SH COLOFÓN Esta página es parte de la versión 5.10 del proyecto Linux \fIman\-pages\fP. Puede encontrar una descripción del proyecto, información sobre cómo informar errores y la última versión de esta página en \%https://www.kernel.org/doc/man\-pages/. .PP .SH TRADUCCIÓN La traducción al español de esta página del manual fue creada por Miguel Pérez Ibars . .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 .