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

Pexecnameobtain full path to process executable

Process Control Library (libproc, -lproc)

#include <libproc.h>

char *
Pexecname(struct ps_prochandle *P, char *buf, size_t buflen);

The () function attempts to determine the full path to the process executable referred to by the handle P.

If found, buf will be filled in with the full path for up to buflen bytes, including the null terminator.

For a handle grabbed with Pgrab_file(3PROC), the executable refers to the path of the file itself. For a core file, the system attempts to determine the original path of the executable and return that.

Upon successful completion, the Pexecname() function returns the value of buf, and up to buflen bytes of buf are filled in with a null-terminated path. Otherwise, NULL is returned.

See in libproc(3LIB).

libproc(3LIB)

May 11, 2016 OmniOS