-
Notifications
You must be signed in to change notification settings - Fork 2
/
quark_process_lookup.3
41 lines (41 loc) · 1.09 KB
/
quark_process_lookup.3
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
.Dd $Mdocdate$
.Dt QUARK_PROCESS_LOOKUP 3
.Os
.Sh NAME
.Nm quark_process_lookup
.Nd lookup a
.Vt quark_process
in quark's cache
.Sh SYNOPSIS
.In quark.h
.Ft const struct quark_process *
.Fn quark_process_lookup "struct quark_queue *qq" "int pid"
.Sh DESCRIPTION
.Nm
looks for the cached process referenced by
.Fa pid .
.Pp
Quark's internal cache keeps processes that exited for a grace time, meaning
you can still lookup them for a little while before they're garbage
collected.
At the time of this writing, this is hardcoded to 4 seconds.
.Sh RETURN VALUES
Returns a pointer to the internal process if found.
The pointer points to the internal process used by quark, therefore, its
contents must
.Em NOT
be modified, or accessed while
.Xr quark_queue_get_event 3
is taking place, as this might free the pointed memory.
.Sh SEE ALSO
.Xr quark_event_dump 3 ,
.Xr quark_queue_block 3 ,
.Xr quark_queue_close 3 ,
.Xr quark_queue_default_attr 3 ,
.Xr quark_queue_get_epollfd 3 ,
.Xr quark_queue_get_event 3 ,
.Xr quark_queue_get_stats 3 ,
.Xr quark_queue_open 3 ,
.Xr quark-btf 8 ,
.Xr quark-mon 8 ,
.Xr quark-test 8