EF_VFORK_MODE

Onload User Guide (UG1586)

Document ID
UG1586
Release Date
2023-07-31
Revision
1.2 English
Name
vfork_mode
Default
1
Minimum
0
Maximum
2
Scope
per-process

This option dictates how vfork() intercept should work. After a vfork(), parent and child still share address space but not file descriptors. We have to be careful about making changes in the child that can be seen in the parent. We offer three options here. Different apps might require different options depending on their use of vfork(). If using EF_VFORK_MODE=2, it is not safe to create sockets or pipes in the child before calling exec().

  • 0 - Old behavior. Replace vfork() with fork()
  • 1 - Replace vfork() with fork() and block parent till child exits/execs
  • 2 - Replace vfork() with vfork().