.\" Automatically generated by Pandoc 1.16.0.2
.\"
.TH "IBV_IS_FORK_INITIALIZED" "3" "2020\-10\-09" "libibverbs" "Libibverbs Programmer\[aq]s Manual"
.hy
.SH NAME
.PP
ibv_is_fork_initialized \- check if fork support (ibv_fork_init) is
enabled
.SH SYNOPSIS
.IP
.nf
\f[C]
#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);
\f[]
.fi
.SH DESCRIPTION
.PP
\f[B]ibv_is_fork_initialized()\f[] checks whether libibverbs
\f[B]fork()\f[] support was enabled through the \f[B]ibv_fork_init()\f[]
verb.
.SH RETURN VALUE
.PP
\f[B]ibv_is_fork_initialized()\f[] 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[] is unneeded.
.SH NOTES
.PP
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[] was called or not.
.SH SEE ALSO
.PP
\f[B]fork\f[](2), \f[B]ibv_fork_init\f[](3)
.SH AUTHOR
.PP
Gal Pressman <galpress@amazon.com>
