1READPROC(3) Linux Programmer's Manual READPROC(3)
2
3
4
6 readproc, freeproc - read information from next /proc/## entry
7
9 #include <proc/readproc.h>
10
11 proc_t* readproc(PROCTAB *PT, proc_t *return_buf);
12
13 void freeproc(proc_t *p);
14
15
17 readproc reads the information for the next process matching the crite‐
18 ria specified in PT and fills them into a proc_t structure. If
19 return_buf is not NULL, it will use the struct pointed at by
20 return_buf. Otherwise it will allocate a new proc_t stucture and
21 return a pointer to it. Note that (if so specified in PT) readproc
22 always allocates memory if it fills in the environ or cmdline parts of
23 proc_t.
24
25 freeproc frees all memory allocated for the proc_t struct *p.
26
27 The proc_t structure is defined in <proc/readproc.h>, please look there
28 for a definition of all fields.
29
30
32 readproc returns a pointer to the next proc_t or NULL if there are no
33 more processes left.
34
35
37 openproc(3), readproctab(3), /usr/include/proc/readproc.h, /proc/#pid/,
38
39
40
41Linux Manpage 20 June 2014 READPROC(3)