1 PEXECNAME(3PROC)       Process Control Library Functions      PEXECNAME(3PROC)
   2 
   3 NAME
   4      Pexecname - obtain full path to process executable
   5 
   6 LIBRARY
   7      Process Control Library (libproc, -lproc)
   8 
   9 SYNOPSIS
  10      #include <libproc.h>
  11 
  12      char *
  13      Pexecname(struct ps_prochandle *P, char *buf, size_t buflen);
  14 
  15 DESCRIPTION
  16      The Pexecname() function attempts to determine the full path to the
  17      process executable referred to by the handle P.
  18 
  19      If found, buf will be filled in with the full path for up to buflen
  20      bytes, including the null terminator.
  21 
  22      For a handle grabbed with Pgrab_file(3PROC), the executable refers to the
  23      path of the file itself.  For a core file, the system attempts to
  24      determine the original path of the executable and return that.
  25 
  26 RETURN VALUES
  27      Upon successful completion, the Pexecname() function returns the value of
  28      buf, and up to buflen bytes of buf are filled in with a null-terminated
  29      path.  Otherwise, NULL is returned.
  30 
  31 INTERFACE STABILITY
  32      Uncommitted
  33 
  34 MT-LEVEL
  35      See LOCKING in libproc(3LIB).
  36 
  37 SEE ALSO
  38      libproc(3LIB)
  39 
  40 illumos                          May 11, 2016                          illumos