| GETENV(3) | GETENV(3)
| NAME
| getenv, putenv – access environment variables
SYNOPSIS
| `#include <u.h> #include <libc.h>
` `char* getenv(char *name) int putenv(char *name, char *val)`
DESCRIPTION
| Getenv fetches the environment value associated with name into memory allocated with malloc(3), 0-terminates it, and returns a pointer to that area. If no file exists, 0 is returned.
Putenv sets the environment value associated with name to val.
SOURCE
| `/build/plan9port/pkg/plan9port/usr/local/plan9port/src/lib9/getenv.c`
DIAGNOSTICS
| Sets errstr.
BUGS
| To avoid name conflicts with the underlying system, getenv and putenv are preprocessor macros defined as p9getenv and p9putenv; see intro(3).