QUARK_PROCESS_ITER(3) Library Functions Manual QUARK_PROCESS_ITER(3)

quark_process_iter_init, quark_process_iter_nextstring process iteration operations

#include <quark.h>

void
quark_process_iter_init(struct quark_process_iter *, struct quark_queue *qq);

const quark_process *
quark_process_iter_next(struct quark_process_iter *);

Initialize and iterate over the internal cache of processes, it can be used on boot up to get a list of all learned processes, or else.

struct quark_process_iter qi;
struct quark_process *qp;

quark_process_iter_init(&qi, qq);
while ((qp = quark_process_next(&qi)) != NULL)
	printf("process %d0, qp->pid);

The returned process points to internal memory and must not be modified, the pointer is invalidated on any subsequent call of quark_queue_get_event(3).

quark_process_lookup(3), quark_queue_block(3), quark_queue_close(3), quark_queue_default_attr(3), quark_queue_get_epollfd(3), quark_queue_get_event(3), quark_queue_get_stats(3), quark_queue_open(3), quark(7), quark-btf(8), quark-mon(8)

February 11, 2025 Linux