---
name: "ibv_is_fork_initialized"
section: "3"
platform: "linux"
package: "rdma-core"
version: "65.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/ibv_is_fork_initialized"
---

# ibv\_is\_fork\_initialized(3)

check if fork support (ibv\_fork\_init) is enabled

## NAME

ibv\_is\_fork\_initialized - check if fork support (ibv\_fork\_init) is enabled

## SYNOPSIS

-

  ```
  #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);
  ```

## DESCRIPTION

**ibv\_is\_fork\_initialized()** checks whether libibverbs **fork()** support was enabled through the **ibv\_fork\_init()** verb.

## RETURN VALUE

**ibv\_is\_fork\_initialized()** 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 **ibv\_fork\_init()** is unneeded.

## 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 **ibv\_fork\_init()** was called or not.

## SEE ALSO

[**fork**(2)](/fork/2.md), [**ibv\_fork\_init**(3)](/ibv_fork_init/3.md)

## AUTHOR

Gal Pressman ⟨galpress@amazon.com⟩\\c
