Print this page
8158 Want named threads API
9857 proc manpages should have LIBRARY section
   1 PEXECNAME(3PROC)       Process Control Library Functions      PEXECNAME(3PROC)
   2 
   3 NAME
   4      Pexecname - obtain full path to process executable
   5 
   6 SYNOPSIS
   7      Process Control Library (libproc, -lproc)


   8      #include <libproc.h>
   9 
  10      char *
  11      Pexecname(struct ps_prochandle *P, char *buf, size_t buflen);
  12 
  13 DESCRIPTION
  14      The Pexecname() function attempts to determine the full path to the
  15      process executable referred to by the handle P.
  16 
  17      If found, buf will be filled in with the full path for up to buflen
  18      bytes, including the null terminator.
  19 
  20      For a handle grabbed with Pgrab_file(3PROC), the executable refers to the
  21      path of the file itself.  For a core file, the system attempts to
  22      determine the original path of the executable and return that.
  23 
  24 RETURN VALUES
  25      Upon successful completion, the Pexecname() function returns the value of
  26      buf, and up to buflen bytes of buf are filled in with a null-terminated
  27      path.  Otherwise, NULL is returned.
   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.