Print this page
8158 Want named threads API
9857 proc manpages should have LIBRARY section
   1 PREOPEN(3PROC)         Process Control Library Functions        PREOPEN(3PROC)
   2 
   3 NAME
   4      Preopen - reopen a process
   5 
   6 SYNOPSIS
   7      Process Control Library (libproc, -lproc)


   8      #include <libproc.h>
   9 
  10      int
  11      Preopen(struct ps_prochandle *P);
  12 
  13 DESCRIPTION
  14      The Preopen() function is used to regain control of the process
  15      represented by the handle P.  A loss of control is indicated by the
  16      Pstatus(3PROC) function returning the value PS_LOST.  This may occur when
  17      the controlled process performs an exec(2) of a setuid or setgid binary
  18      or one where the controlling process cannot read the object file.  For
  19      more information on this, see the PROGRAMMING NOTES section of proc(4).
  20 
  21      If successful, the controlling process will obtain control of the process
  22      specified by P.  If it fails, the controlling process should release the
  23      handle with Prelease(3PROC).  Note there are occasions where due to
  24      permissions it may not be possible to obtain control again.
  25 
  26 RETURN VALUES
  27      Upon successful completion, the Preopen() function returns 0. Otherwise,
   1 PREOPEN(3PROC)         Process Control Library Functions        PREOPEN(3PROC)
   2 
   3 NAME
   4      Preopen - reopen a process
   5 
   6 LIBRARY
   7      Process Control Library (libproc, -lproc)
   8 
   9 SYNOPSIS
  10      #include <libproc.h>
  11 
  12      int
  13      Preopen(struct ps_prochandle *P);
  14 
  15 DESCRIPTION
  16      The Preopen() function is used to regain control of the process
  17      represented by the handle P.  A loss of control is indicated by the
  18      Pstatus(3PROC) function returning the value PS_LOST.  This may occur when
  19      the controlled process performs an exec(2) of a setuid or setgid binary
  20      or one where the controlling process cannot read the object file.  For
  21      more information on this, see the PROGRAMMING NOTES section of proc(4).
  22 
  23      If successful, the controlling process will obtain control of the process
  24      specified by P.  If it fails, the controlling process should release the
  25      handle with Prelease(3PROC).  Note there are occasions where due to
  26      permissions it may not be possible to obtain control again.
  27 
  28 RETURN VALUES
  29      Upon successful completion, the Preopen() function returns 0. Otherwise,