Print this page
8158 Want named threads API
9857 proc manpages should have LIBRARY section
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man3proc/Pfdinfo_iter.3proc.man.txt
+++ new/usr/src/man/man3proc/Pfdinfo_iter.3proc.man.txt
1 1 PFDINFO_ITER(3PROC) Process Control Library Functions PFDINFO_ITER(3PROC)
2 2
3 3 NAME
4 4 Pfdinfo_iter - iterate open files in a process
5 5
6 -SYNOPSIS
6 +LIBRARY
7 7 Process Control Library (libproc, -lproc)
8 +
9 +SYNOPSIS
8 10 #include <libproc.h>
9 11
10 12 int
11 13 Pfdinfo_iter(struct ps_prochandle *P, proc_fdinfo_f *func, void *data);
12 14
13 15 DESCRIPTION
14 16 The Pfdinfo_iter() function iterates over the open files in the process
15 17 represented by P.
16 18
17 19 For each open file, the callback function func will be invoked and it
18 20 will be passed the data argument as well as a pointer to a prfdinfo_t
19 21 structure defined in libproc(3LIB). For the full signature of the
20 22 proc_fdinfo_f see libproc(3LIB).
21 23
22 24 The return value of func controls whether or not iteration continues. If
23 25 func returns 0, then iteration will continue. However, if func instead
24 26 returns a non-zero value, then iteration will halt and that value will be
25 27 used as the return value of the Pfdinfo_iter() function. Because the
26 28 Pfdinfo_iter() function returns -1 to an indicate its own errors, it is
27 29 recommended that the callback function does not return -1 to indicate an
28 30 error so that the caller may distinguish between the failure of the
29 31 callback function and the failure of the Pfdinfo_iter() function.
30 32
31 33 RETURN VALUES
32 34 Upon successful completion, the Pfdinfo_iter() returns 0. Otherwise, if
33 35 there was an internal error then -1 is returned. Otherwise, if the
34 36 callback function func returns non-zero, then its return value will be
35 37 returned instead.
36 38
37 39 INTERFACE STABILITY
38 40 Uncommitted
39 41
40 42 MT-LEVEL
41 43 See LOCKING in libproc(3LIB).
42 44
43 45 SEE ALSO
44 46 libproc(3LIB)
45 47
46 48 illumos May 11, 2016 illumos
↓ open down ↓ |
29 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX