PPLATFORM(3PROC) Process Control Library Functions PPLATFORM(3PROC)

Pplatform
get platform string

Process Control Library (libproc, -lproc)

#include <libproc.h>
char *
Pplatform(struct ps_prochandle *P, char *buffer, size_t bufsize);

The Pplatform() function determines the name of the platform for the process handle P. Up to bufsize characters, including the null terminator, will be copied into buffer.
The platform is the value reported by the -s option to uname(1). For example, on x86 systems, the value will be i86pc.
Note, process handles that correspond to a file, created by Pgrab_file(3PROC), will not report a platform and the Pplatform() function will fail.

Upon successful completion, the Pplatform() function returns buffer. Otherwise, NULL is returned, errno is set, and buffer is not updated.

The Pplatform() function will fail if:
 
 
P refers to a core file and there is no NT_PLATFORM ELF note available.
 
 
P refers to a live process and buffer is an invalid address.

Uncommitted

See LOCKING in libproc(3LIB).

uname(1), sysinfo(2), libproc(3LIB), proc(4)
May 11, 2016 illumos