GETENV(3V)

NAME
getenv - return value for environment name

SYNOPSIS

#include <stdlib.h>

char *getenv(name)
char *name;

DESCRIPTION

getenv() searches the environment list (see environ(5V)) for a string of the form name=value, and returns a pointer to the string value if such a string is present. Otherwise, getenv() returns NULL.

RETURN VALUES

On success, getenv() returns a pointer to a string containing the value for the specified name. If the specified name cannot be found, it returns NULL.

SEE ALSO
environ(5V), execve(2V), putenv(3)