QUARK_PROCESS_LOOKUP(3) Library Functions Manual QUARK_PROCESS_LOOKUP(3)

quark_process_lookuplookup a quark_process in quark's cache

#include <quark.h>

const struct quark_process *
quark_process_lookup(struct quark_queue *qq, int pid);

quark_process_lookup looks for the cached process referenced by pid.

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.

Returns a pointer to the internal process if found. The pointer points to the internal process used by quark, therefore, its contents must be modified, or accessed while quark_queue_get_events(3) is taking place, as this might free the pointed memory.

quark_event_dump(3), quark_queue_block(3), quark_queue_close(3), quark_queue_default_attr(3), quark_queue_get_epollfd(3), quark_queue_get_events(3), quark_queue_get_stats(3), quark_queue_open(3), quark-btf(8), quark-mon(8), quark-test(8)

October 25, 2024 Linux