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


   8      #include <libproc.h>
   9 
  10      int
  11      Penv_iter(struct ps_prochandle *P, proc_env_f *func, void *data);
  12 
  13 DESCRIPTION
  14      The Penv_iter() function iterates over the environment of the process
  15      represented by P.  For each environment variable, func is passed the
  16      caller argument data along with the address of the environment variable
  17      and the key-value pair.  For the full signature of the proc_env_f
  18      callback, see libproc(3LIB).
  19 
  20      The callback's return value controls whether or not iteration proceeds.
  21      If func returns zero, then iteration continues.  Otherwise, iteration is
  22      terminated and the value is returned.  It is recommended that callback
  23      functions do not return -1 so as to distinguish between the failure of
  24      the Penv_iter() function and the callback function.
  25 
  26 RETURN VALUES
  27      Upon successful completion, the Penv_iter() function returns 0.
   1 PENV_ITER(3PROC)       Process Control Library Functions      PENV_ITER(3PROC)
   2 
   3 NAME
   4      Penv_iter - iterate process environment
   5 
   6 LIBRARY
   7      Process Control Library (libproc, -lproc)
   8 
   9 SYNOPSIS
  10      #include <libproc.h>
  11 
  12      int
  13      Penv_iter(struct ps_prochandle *P, proc_env_f *func, void *data);
  14 
  15 DESCRIPTION
  16      The Penv_iter() function iterates over the environment of the process
  17      represented by P.  For each environment variable, func is passed the
  18      caller argument data along with the address of the environment variable
  19      and the key-value pair.  For the full signature of the proc_env_f
  20      callback, see libproc(3LIB).
  21 
  22      The callback's return value controls whether or not iteration proceeds.
  23      If func returns zero, then iteration continues.  Otherwise, iteration is
  24      terminated and the value is returned.  It is recommended that callback
  25      functions do not return -1 so as to distinguish between the failure of
  26      the Penv_iter() function and the callback function.
  27 
  28 RETURN VALUES
  29      Upon successful completion, the Penv_iter() function returns 0.