PROCPS_PIDS_reset(3)

NAME
procps_pids_reset - Change what information is collected for a process

SYNOPSIS
#include <proc/procps.h>

int procps_pids_reset(struct pids_info **info, enum pids_item *items, int numitems);

Link with -lprocps.

DESCRIPTION
During the initial call to procps_pids_new(3), the information structure is allocated and the information items are specified. procps_pids_reset allows you to change what items for a process are collected without having to unreference and create a new pids_info structure. The changed PID information structure can then be used in subsequent calls to procps_pids_get(3), procps_pids_reap(3), procps_pids_reset(3), procps_pids_select(3), procps_pids_sort(3) or even to further calls to procps_pids_reset itself. The items and numitems parameters are identical to the parameters used in procps_pids_new.

RETURN VALUE
The function returns 0 on success and one of negative values below on failure.

-EINVAL
    One of the given parameters is incorrect.

-ENOMEM
    Unable to allocate memory for the changed structure.

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

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