Because we need to run OCaml code before the fork. It’s probably best to look at what we’re really trying to do here, see the structure of nbdkit: nbdkit-plugin - how to write nbdkit plugins All of those load/config/… phase calls are implemented as OCaml callbacks.
rwmjones
23
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Test caml_state and conditionally caml_acquire_runtime_system - good or bad? | 9 | 608 | June 27, 2023 | |
| Signal handling checkpoints and Mutex.lock | 20 | 793 | June 24, 2024 | |
| Trying to understand `caml_acquire_runtime_system` when called from C threads | 7 | 355 | May 26, 2025 | |
| A tutorial on parallel programming in OCaml 5 | 34 | 8776 | December 21, 2022 | |
| OCaml 5.0 and C interface | 6 | 999 | November 25, 2022 |