io_uring_ring_dontfork(3) liburing Manual io_uring_ring_dontfork(3) NAME io_uring_ring_dontfork - prevent ring memory from being shared after fork SYNOPSIS #include int io_uring_ring_dontfork(struct io_uring *ring); DESCRIPTION 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. SEE ALSO io_uring_queue_init(3), madvise(2), fork(2) liburing-2.4 January 18, 2025 io_uring_ring_dontfork(3)