1 PFDINFO_ITER(3PROC) Process Control Library Functions PFDINFO_ITER(3PROC)
2
3 NAME
4 Pfdinfo_iter - iterate open files in a process
5
6 SYNOPSIS
7 Process Control Library (libproc, -lproc)
8 #include <libproc.h>
9
10 int
11 Pfdinfo_iter(struct ps_prochandle *P, proc_fdinfo_f *func, void *data);
12
13 DESCRIPTION
14 The Pfdinfo_iter() function iterates over the open files in the process
15 represented by P.
16
17 For each open file, the callback function func will be invoked and it
18 will be passed the data argument as well as a pointer to a prfdinfo_t
19 structure defined in libproc(3LIB). For the full signature of the
20 proc_fdinfo_f see libproc(3LIB).
21
22 The return value of func controls whether or not iteration continues. If
23 func returns 0, then iteration will continue. However, if func instead
24 returns a non-zero value, then iteration will halt and that value will be
25 used as the return value of the Pfdinfo_iter() function. Because the
26 Pfdinfo_iter() function returns -1 to an indicate its own errors, it is
27 recommended that the callback function does not return -1 to indicate an
|
1 PFDINFO_ITER(3PROC) Process Control Library Functions PFDINFO_ITER(3PROC)
2
3 NAME
4 Pfdinfo_iter - iterate open files in a process
5
6 LIBRARY
7 Process Control Library (libproc, -lproc)
8
9 SYNOPSIS
10 #include <libproc.h>
11
12 int
13 Pfdinfo_iter(struct ps_prochandle *P, proc_fdinfo_f *func, void *data);
14
15 DESCRIPTION
16 The Pfdinfo_iter() function iterates over the open files in the process
17 represented by P.
18
19 For each open file, the callback function func will be invoked and it
20 will be passed the data argument as well as a pointer to a prfdinfo_t
21 structure defined in libproc(3LIB). For the full signature of the
22 proc_fdinfo_f see libproc(3LIB).
23
24 The return value of func controls whether or not iteration continues. If
25 func returns 0, then iteration will continue. However, if func instead
26 returns a non-zero value, then iteration will halt and that value will be
27 used as the return value of the Pfdinfo_iter() function. Because the
28 Pfdinfo_iter() function returns -1 to an indicate its own errors, it is
29 recommended that the callback function does not return -1 to indicate an
|