io_uring_ring_dontfork3
Prevent ring memory from being shared after fork
Usage
#include <liburing.h>
int io_uring_ring_dontfork(struct io_uring *ring);
Overview
The io_uring_ring_dontfork(3) function ensures that the mmap'ed rings for the io_uring instance ring are not available to a child process after a fork(2).
This function uses madvise(2) with MADV_DONTFORK on the mmap'ed ranges to prevent them from being shared with child processes. This is useful when the parent wants exclusive access to the ring and doesn't want the child to be able to access or interfere with it.
Return value
Returns 0 on success. On error, a negative errno value is returned.