PROCPS_PIDS_select(3)

NAME
procps_pids_select - Harvest process information that matches PID or UID

SYNOPSIS
#include <proc/procps.h>

struct pids_fetch * procps_pids_select(struct pids_info *info, unsigned *these, int numthese, enum pids_select_type which);

Link with -lprocps.

DESCRIPTION
procps_pids_select() provides the same functionality as procps_pids_reap() except it will only fetch information for the processes that have the process ID (PID) or User ID (UID) found in the array these. these is an array of process IDs (PIDs) or User IDs that the function will use to match against. numthese the length of the these array. The which parameter tells the funtion what type of information is contained in these and can be either PIDS_SELECT_PID if these is an array of PIDs or PIDS_SELECT_UID if these is an array of UIDs. The info structure first needs to be initialised by procps_pids_new(3). if procps_pids_select() returns successfully, a program can then iterate through a loop using the accessor methods described in libproc(3).

RETURN VALUE
procps_pids_select() returns a pointer to struct pids_fetch on success and NULL on failure.

VERSIONS
procps_pids_select() first appeared in libproc-2 version 0.0.

SEE ALSO
libproc(3), procps_pids_new(3), procps_pids_reap(3), procps_pids_unref(3), proc(5).