PROCPS_PIDS_UREF(3)

NAME
procps_pids_refg - Clear memory of pids structure, if no longer used

SYNOPSIS
#include <proc/procps.h>

int procps_pids_refg(struct pids_info **info);

Link with -lprocps.

DESCRIPTION
procps_pids_refg() will note that one less reference is used for the specified structure. If this was the last reference, the function returns the memory for the PID information structure that was created with procps_pids_new(3).

RETURN VALUE
The function returns 0 if the structure was freed or a positive integer of the current references if there were others. It will return one of negative values below on failure.

-EINVAL
    One of the given parameters is incorrect.

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

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