1 PZONENAME(3PROC) Process Control Library Functions PZONENAME(3PROC) 2 3 NAME 4 Pzonename, Pzoneroot, Pzonepath - get zone name, root, and full object 5 path 6 7 LIBRARY 8 Process Control Library (libproc, -lproc) 9 10 SYNOPSIS 11 #include <libproc.h> 12 13 char * 14 Pzonename(struct ps_prochandle *P, char *buf, size_t nbyte); 15 16 char * 17 Pzoneroot(struct ps_prochandle *P, char *buf, size_t nbyte); 18 19 char * 20 Pzonepath(struct ps_prochandle *P, const char *path, char *buf, 21 size_t nbyte); 22 23 DESCRIPTION 24 The Pzonename() function attempts to determine the name of the zone for 25 the process handle P. If found, up to nbytes, including a null 26 terminator, will be written into buf. 27 28 The Pzoneroot() function attempts to determine the root of the zone 29 corresponding to the process handle P. If found, up to nbytes, including 30 a null terminator, will be written into buf. If the root cannot be 31 found, for example a core file that did not originate on the current 32 system, then the empty string will be written into buf. 33 34 The Pzonepath() function attempts to derive the full path of the object 35 path in a zone relative to the root associated with the current process 36 handle P. If found, up to nbytes, including a null terminator, will be 37 written into buf. It is legal to use the same buffer for both path and 38 buf; it will not be updated unless the function completes successfully. 39 40 RETURN VALUES 41 Upon successful completion, the Pzonename(), Pzoneroot(), and Pzonepath() 42 functions return buf. Otherwise, if an error occurred, NULL is returned 43 and errno is set. 44 45 ERRORS 46 The Pzonename() and Pzoneroot() functions will fail if: 47 48 ENODATA P refers to a core file and zone information was not 49 available in the core dump or P refers to an ELF 50 object grabbed through Pgrab_file(3PROC). 51 52 EFAULT P refers to an active process and buf is invalid. 53 54 The Pzoneroot() function will fail if: 55 56 ENOMEM Insufficient memory was available on the system. 57 58 INTERFACE STABILITY 59 Uncommitted 60 61 MT-LEVEL 62 See LOCKING in libproc(3LIB). 63 64 SEE ALSO 65 getzoneidbyname(3C), libproc(3LIB), proc(4) 66 67 illumos May 11, 2016 illumos