PGETENV(3PROC) Process Control Library Functions PGETENV(3PROC)
NAME
Pgetenv - get process environment variable
LIBRARY
Process Control Library (libproc, -lproc)
SYNOPSIS
#include <libproc.h> char * Pgetenv(
struct ps_prochandle *P,
const char *name,
char *buf,
size_t buflen);
DESCRIPTION
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.
RETURN VALUES
Upon successful completion, the
Pgetenv() function returns the pointer
buf. Otherwise, if the environment variable was not found, NULL is
returned.
INTERFACE STABILITY
UncommittedMT-LEVEL See
LOCKING in
libproc(3LIB).
SEE ALSO
libproc(3LIB),
Penv_iter(3PROC),
environ(7)illumos May 11, 2016 illumos