1 PSIGNAL(3PROC)         Process Control Library Functions        PSIGNAL(3PROC)
   2 
   3 NAME
   4      Psignal - set signal tracing action
   5 
   6 LIBRARY
   7      Process Control Library (libproc, -lproc)
   8 
   9 SYNOPSIS
  10      #include <libproc.h>
  11 
  12      int
  13      Psignal(struct ps_prochandle *P, int which, int stop);
  14 
  15 DESCRIPTION
  16      The Psignal() function sets the signal tracing flag for the process
  17      handle P.  If stop is non-zero it causes the process handle to stop
  18      threads that encounter the signal which.  If stop is zero, then it
  19      disables tracing for the signal which.
  20 
  21      The signal constants, representing valid values for which, can be found
  22      in signal.h(3HEAD.) The signal SIGKILL may not be stopped.
  23 
  24      Note, only active processes may have their signal tracing flags updated.
  25      Process handles that refer to core files, zombie processes, and files do
  26      not have signal tracing flags.  Calling this function on them is an
  27      error.
  28 
  29 RETURN VALUES
  30      Upon successful completion, the Psignal() function returns the previous
  31      disposition of the signal which.  It returns 1 if it was set and 0 if
  32      not.  Otherwise, -1 is returned and errno is set to indicate the error.
  33 
  34 ERRORS
  35      The Psignal() function will fail if:
  36 
  37      EINVAL             which is SIGKILL and stop is non-zero .
  38 
  39                         which is not a valid signal.
  40 
  41      ENOENT             P does not correspond to an active process.
  42 
  43 INTERFACE STABILITY
  44      Uncommitted
  45 
  46 MT-LEVEL
  47      See LOCKING in libproc(3LIB).
  48 
  49 SEE ALSO
  50      signal.h(3HEAD), libproc(3LIB), Psetsignal(3PROC), proc(4)
  51 
  52 illumos                          May 11, 2016                          illumos