| PGETENV(3PROC) | Process Control Library Functions | PGETENV(3PROC) |
Pgetenv — get
process environment variable
Process Control Library (libproc, -lproc)
#include
<libproc.h>
char *
Pgetenv(struct ps_prochandle *P,
const char *name, char *buf,
size_t buflen);
The Pgetenv function searches the environment of the process handle P for the environment variable named name. If found it copies up to buflen characters of the value, including the null terminator, into the buffer buf. Everything after the = sign is copied.
Upon successful completion, the Pgetenv()
function returns the pointer buf. Otherwise, if the
environment variable was not found, NULL is
returned.
See LOCKING in libproc(3LIB).
| May 11, 2016 | OmniOS |