1 PLWP_GETPSINFO(3PROC)  Process Control Library Functions PLWP_GETPSINFO(3PROC)
   2 
   3 NAME
   4      Plwp_getpsinfo - get thread specific ps information
   5 
   6 LIBRARY
   7      Process Control Library (libproc, -lproc)
   8 
   9 SYNOPSIS
  10      #include <libproc.h>
  11 
  12      int
  13      Plwp_getpsinfo(struct ps_prochandle *P, lwpid_t lwpid, lwpsinfo_t *lps);
  14 
  15 DESCRIPTION
  16      The Plwp_getpsinfo() function looks up the thread-specific ps(1)
  17      information for the thread specified by lwpid in the process handle P.
  18      The caller should provide a pointer to an lwpsinfo_t, lps, whose
  19      definition can be found in proc(4).  lps will be filled in with
  20      information such as the thread's id, its current state, priority, and
  21      run-time.
  22 
  23      The Plwp_getpsinfo() function only works on process handles that refer to
  24      active processes and core files, it does not work on process handles that
  25      refer to individual files.
  26 
  27 RETURN VALUES
  28      Upon successful completion, the Plwp_getpsinfo() function returns 0 and
  29      lps is filled in with the thread-specific ps(1) information.  Otherwise,
  30      -1 is returned and errno is set to indicate the error.
  31 
  32 ERRORS
  33      For a full list of possible errors also see the DIAGNOSTICS section in
  34      proc(4).
  35 
  36      The Plwp_getpsinfo() function will fail if:
  37 
  38      ENODATA            P refers to a file handle obtained through
  39                         Pgrab_file(3PROC).
  40 
  41      EINVAL             The process handle P refers to a core file and the
  42                         specified thread does not exist.
  43 
  44      ENOENT             The process handle P refers to an active process and
  45                         the specified thread does not exist.
  46 
  47 INTERFACE STABILITY
  48      Uncommitted
  49 
  50 MT-LEVEL
  51      See LOCKING in ps(1), libproc(3LIB).
  52 
  53 SEE ALSO
  54      libproc(3LIB), proc(4)
  55 
  56 illumos                          May 11, 2016                          illumos