1 PGETENV(3PROC) Process Control Library Functions PGETENV(3PROC) 2 3 NAME 4 Pgetenv - get process environment variable 5 6 LIBRARY 7 Process Control Library (libproc, -lproc) 8 9 SYNOPSIS 10 #include <libproc.h> 11 12 char * 13 Pgetenv(struct ps_prochandle *P, const char *name, char *buf, 14 size_t buflen); 15 16 DESCRIPTION 17 The Pgetenv function searches the environment of the process handle P for 18 the environment variable named name. If found it copies up to buflen 19 characters of the value, including the null terminator, into the buffer 20 buf. Everything after the = sign is copied. 21 22 RETURN VALUES 23 Upon successful completion, the Pgetenv() function returns the pointer 24 buf. Otherwise, if the environment variable was not found, NULL is 25 returned. 26 27 INTERFACE STABILITY 28 Uncommitted 29 30 MT-LEVEL 31 See LOCKING in libproc(3LIB). 32 33 SEE ALSO 34 libproc(3LIB), Penv_iter(3PROC), environ(5) 35 36 illumos May 11, 2016 illumos