1 PCREATE_AGENT(3PROC)   Process Control Library Functions  PCREATE_AGENT(3PROC)
   2 
   3 NAME
   4      Pcreate_agent - create the agent LWP
   5 
   6 LIBRARY
   7      Process Control Library (libproc, -lproc)
   8 
   9 SYNOPSIS
  10      #include <libproc.h>
  11 
  12      int
  13      Pcreate_agent(struct ps_prochandle *P);
  14 
  15 DESCRIPTION
  16      The Pcreate_agent() function creates the agent LWP in the process
  17      represented by the handle P.  The agent LWP is used as a means to force
  18      system calls to be invoked on the controlled process.  For more
  19      information on the agent LWP, see proc(4).
  20 
  21      The agent LWP cannot be created for process handles corresponding to core
  22      files, zombie processes, processes that have yet to run, and ELF objects.
  23 
  24      The Pcreate_agent() function is reentrant.  It may be entered
  25      recursively.  The act of creating the agent LWP will cause the process to
  26      be stopped.  For every call to the Pcreate_agent() function, a
  27      corresponding call to Pdestroy_agent(3PROC) is required.
  28 
  29 RETURN VALUES
  30      Upon successful completion, the Pcreate_agent() function returns 0 and
  31      creates the agent LWP.  Otherwise, -1 is returned, errno is set to
  32      indicate the error, and the agent LWP is not created.
  33 
  34 ERRORS
  35      The Pcreate_agent() function will fail if:
  36 
  37      ENOENT             The process referred to by P is a core file, zombie,
  38                         ELF object, or has not begun execution.
  39 
  40      Note, it is possible for other error numbers to be returned.  If they
  41      are, they represent unanticipated failure.
  42 
  43 INTERFACE STABILITY
  44      Uncommitted
  45 
  46 MT-LEVEL
  47      See LOCKING in libproc(3LIB).
  48 
  49 SEE ALSO
  50      libproc(3LIB), Pdestroy_agent(3PROC), proc(4)
  51 
  52 illumos                          May 11, 2016                          illumos