.\" Automatically generated by Pandoc 3.1.11.1
.\"
.TH "IBV_IS_FORK_INITIALIZED" "3" "2020\-10\-09" "libibverbs" "Libibverbs Programmer\[cq]s Manual"
.SH NAME
ibv_is_fork_initialized \- check if fork support (ibv_fork_init) is
enabled
.SH SYNOPSIS
.IP
.EX
#include <infiniband/verbs.h>

enum ibv_fork_status {
    IBV_FORK_DISABLED,
    IBV_FORK_ENABLED,
    IBV_FORK_UNNEEDED,
};

enum ibv_fork_status ibv_is_fork_initialized(void);
.EE
.SH DESCRIPTION
\f[B]ibv_is_fork_initialized()\f[R] checks whether libibverbs
\f[B]fork()\f[R] support was enabled through the
\f[B]ibv_fork_init()\f[R] verb.
.SH RETURN VALUE
\f[B]ibv_is_fork_initialized()\f[R] returns IBV_FORK_DISABLED if fork
support is disabled, or IBV_FORK_ENABLED if enabled.
IBV_FORK_UNNEEDED return value indicates that the kernel copies DMA
pages on fork, hence a call to \f[B]ibv_fork_init()\f[R] is unneeded.
.SH NOTES
The IBV_FORK_UNNEEDED return value takes precedence over
IBV_FORK_DISABLED and IBV_FORK_ENABLED.
If the kernel supports copy\-on\-fork for DMA pages then
IBV_FORK_UNNEEDED will be returned regardless of whether
\f[B]ibv_fork_init()\f[R] was called or not.
.SH SEE ALSO
\f[B]fork\f[R](2), \f[B]ibv_fork_init\f[R](3)
.SH AUTHOR
Gal Pressman \c
.MT galpress@amazon.com
.ME \c
