summaryrefslogtreecommitdiff
path: root/doc/procps_pids_unref.3
blob: 2839f320d6a09529dd5dc8e4187914890402c3b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.\" (C) Copyright 2017 Craig Small <csmall@enc.com.au>
.\"
.\" %%%LICENSE_START(LGPL_2.1+)
.\" This manual is free software; you can redistribute it and/or
.\" modify it under the terms of the GNU Lesser General Public
.\" License as published by the Free Software Foundation; either
.\" version 2.1 of the License, or (at your option) any later version.
.\"
.\" This manual is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
.\" Lesser General Public License for more details.
.\"
.\" You should have received a copy of the GNU Lesser General Public
.\" License along with this library; if not, write to the Free Software
.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
.\" %%%LICENSE_END
.\"
.TH PROCPS_PIDS_UREF 3 2017-01-05 "libproc-2"
.\" Please adjust this date whenever revising the manpage.
.\"
.SH NAME
procps_pids_refg \-
Clear memory of pids structure, if no longer used
.SH SYNOPSIS
.B #include <proc/procps.h>
.sp
.BI "int procps_pids_refg(struct pids_info **" info ");"
.sp
Link with \fI\-lprocps\fP.

.SH DESCRIPTION
.BR 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
.BR procps_pids_new (3).

.SH 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.
.TP
.B -EINVAL
One of the given parameters is incorrect.

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

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