*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Linux man pages -> setenv (3)              



NAME    [Toc]    [Back]

       setenv - change or add an environment variable

SYNOPSIS    [Toc]    [Back]

       #include <stdlib.h>

       int setenv(const char *name, const char *value, int overwrite);

       void unsetenv(const char *name);

DESCRIPTION    [Toc]    [Back]

       The  setenv()  function	adds the variable name to the environment with
       the value value, if name does not already exist.  If name does exist in
       the  environment,  then	its  value is changed to value if overwrite is
       non-zero; if overwrite is zero, then the value of name is not  changed.

       The unsetenv() function deletes the variable name from the environment.

RETURN VALUE    [Toc]    [Back]

       The setenv() function returns zero on  success,	or  -1	if  there  was
       insufficient space in the environment.

CONFORMING TO    [Toc]    [Back]

       BSD 4.3

SEE ALSO    [Toc]    [Back]

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

BSD				  1993-04-04			     SETENV(3)
[ Back ]
 Similar pages
Name OS Title
putenv IRIX change or add Fortran environment variable
getenv IRIX get value of environment variable
getenv Linux get an environment variable
pam_putenv FreeBSD set the value of an environment variable
putenv NetBSD environment variable functions
unsetenv NetBSD environment variable functions
setenv NetBSD environment variable functions
getenv NetBSD environment variable functions
setenv FreeBSD environment variable functions
putenv Tru64 Sets an environment variable
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service