Blob
1 .TH GETENV 32 .SH NAME3 getenv, putenv \- access environment variables4 .SH SYNOPSIS5 .B #include <u.h>6 .br7 .B #include <libc.h>8 .PP9 .nf10 .B11 char* getenv(char *name)12 .br13 .B14 int putenv(char *name, char *val)15 .fi16 .SH DESCRIPTION17 .I Getenv18 fetches the environment value associated with19 .I name20 into memory allocated with21 .IR malloc (3),22 0-terminates it,23 and returns a pointer to that area.24 If no file exists, 025 is returned.26 .PP27 .I Putenv28 sets the environment value associated with29 .I name30 to31 .IR val .32 .SH SOURCE33 .B /usr/local/plan9/src/lib9/getenv.c34 .SH DIAGNOSTICS35 Sets36 .IR errstr .37 .SH BUGS38 Defined as macros for39 .I p9getenv40 and41 .I p9putenv42 to avoid name conflicts with Unix library calls.