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 \*9/src/lib9/getenv.c34 .SH DIAGNOSTICS35 Sets36 .IR errstr .37 .SH BUGS38 To avoid name conflicts with the underlying system,39 .I getenv40 and41 .I putenv42 are preprocessor macros defined as43 .I p9getenv44 and45 .IR p9putenv ;46 see47 .IR intro (3).