1 PASFD(3PROC)           Process Control Library Functions          PASFD(3PROC)
   2 
   3 NAME
   4      Pasfd - obtain the process address space file descriptor
   5 
   6 LIBRARY
   7      Process Control Library (libproc, -lproc)
   8 
   9 SYNOPSIS
  10      #include <libproc.h>
  11 
  12      int
  13      Pasfd(struct ps_prochandle *P);
  14 
  15 DESCRIPTION
  16      The Pasfd() funtion returns a file descriptor that allows direct access
  17      to the address space of the process handle P.  A defined file descriptor
  18      is provided when using the Pcreate(3PROC), Pgrab(3PROC),
  19      Pgrab_file(3PROC), and Pgrab_core(3PROC) functions.  Note that the
  20      address space may be different in each of these cases and doesn't
  21      necessarily correspond to the /proc as file, except for live processes.
  22      Other means of obtaining a libproc process handle may not define a file
  23      descriptor that contains the address space.
  24 
  25      The returned file descriptor must not be closed and is only valid for as
  26      long as the corresponding process handle P is valid.  After a call to
  27      Prelease(3PROC) the file descriptor is invalidated.
  28 
  29 RETURN VALUES
  30      Upon successful completion, the Pasfd() function returns a valid file
  31      descriptor.  Otherwise, if none exists, then -1 is returned.
  32 
  33 INTERFACE STABILITY
  34      Uncommitted
  35 
  36 MT-LEVEL
  37      See LOCKING in libproc(3LIB).
  38 
  39 SEE ALSO
  40      libproc(3LIB), Pcreate(3PROC), Pgrab(3PROC), Pgrab_core(3PROC),
  41      Pgrab_file(3PROC), Prelease(3PROC), proc(4)
  42 
  43 illumos                          May 11, 2016                          illumos