.\" Copyright 2001 John Levon .\" .\" 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. .\" .\" Additions, aeb, 2001-10-17. .\" .\" Traducido por Miguel Pérez Ibars el 10-julio-2004 .\" .TH CLEARENV 3 "17 octubre 2001" "Manual del Programador de Linux" .SH NOMBRE clearenv \- limpia el entorno .SH SINOPSIS .nf .B #include .sp .BI "int clearenv(void);" .fi .SH DESCRIPCIÓN La función \fBclearenv()\fP borra todos los pares nombre-valor del entorno y establece el valor de la variable externa .I environ a NULL. .SH "VALOR DEVUELTO" La función \fBclearenv()\fP devuelve cero en caso de éxito, y un valor distinto de cero en caso de fallo. .\" 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". .SH DISPONIBILIDAD No está presente en libc4, libc5. En glibc está presente desde la versión 2.0. .SH "CONFORME A" Varias variantes Unix (DGUX, HPUX, QNX, ...). POSIX.9 (enlaces para FORTRAN77). POSIX.1-1996 no aceptaba \fBclearenv()\fP ni \fIputenv()\fP, 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, SUSv3 solo incorpora \fIputenv()\fP, y rechaza \fBclearenv()\fP. .SH OBSERVACIONES Utilizada en aplicaciones conscientes de la importancia de la seguridad. Si la asignación .RS .nf environ = NULL; .fi .RE no está disponible probablemente lo estará. .LP En las páginas de manual de DGUX y Tru64 se puede leer: Si .I environ ha sido modificado por cualquier otro medio que no sea las funciones .IR putenv() , .IR getenv() , o .IR clearenv() entonces .BR clearenv() devolverá un error y el entorno del proceso permanecerá intacto. .\" .LP .\" HPUX has a ENOMEM error return. .SH "VÉASE TAMBIÉN" .BR getenv (3), .BR putenv (3), .BR setenv (3), .BR unsetenv (3), .BR environ (5)