Hasty Briefsbeta

Bilingual

Moving beyond fork() + exec()

4 hours ago
  • #Linux Kernel
  • #System Calls
  • #Process Creation
  • Linux currently relies on fork() and exec() for process creation, but this model is inefficient due to high costs from copying process state.
  • A proposal for 'spawn templates' aimed to optimize repeated executions of the same program by caching executable data, but faced criticism for not addressing the fork() overhead.
  • Reviewers suggested a new approach: create an empty process using pidfd_open() and configure it via pidfd_config(), aligning with posix_spawn() for a native, efficient alternative to fork()/exec().