PZONENAME(3PROC) | Process Control Library Functions | PZONENAME(3PROC) |
Pzonename
,
Pzoneroot
, Pzonepath
— get zone name, root, and full object
path
Process Control Library (libproc, -lproc)
#include
<libproc.h>
char *
Pzonename
(struct ps_prochandle
*P, char *buf, size_t
nbyte);
char *
Pzoneroot
(struct ps_prochandle
*P, char *buf, size_t
nbyte);
char *
Pzonepath
(struct ps_prochandle
*P, const char *path, char
*buf, size_t nbyte);
The
Pzonename
()
function attempts to determine the name of the zone for the process handle
P. If found, up to nbytes,
including a null terminator, will be written into
buf.
The
Pzoneroot
()
function attempts to determine the root of the zone corresponding to the
process handle P. If found, up to
nbytes, including a null terminator, will be written
into buf. If the root cannot be found, for example a
core file that did not originate on the current system, then the empty
string will be written into buf.
The
Pzonepath
()
function attempts to derive the full path of the object
path in a zone relative to the root associated with
the current process handle P. If found, up to
nbytes, including a null terminator, will be written
into buf. It is legal to use the same buffer for both
path and buf; it will not be
updated unless the function completes successfully.
Upon successful completion, the
Pzonename
(), Pzoneroot
(),
and Pzonepath
() functions return
buf.
Otherwise, if an error occurred, NULL
is returned
and
errno is
set.
The Pzonename
() and
Pzoneroot
() functions will fail if:
ENODATA
EFAULT
The Pzoneroot
() function will fail if:
ENOMEM
See LOCKING in libproc(3LIB).
May 11, 2016 | OmniOS |