process-util: add posix_spawn helper

This provides CLONE_VM + CLONE_VFORK semantics, so it is useful to
avoid CoW traps and other issues around doing work between fork()
and exec().
This commit is contained in:
Luca Boccassi
2023-10-12 13:37:22 +01:00
parent 58cb36e56b
commit 6ecdfe7d10
2 changed files with 48 additions and 0 deletions
+2
View File
@@ -210,3 +210,5 @@ int get_process_threads(pid_t pid);
int is_reaper_process(void);
int make_reaper_process(bool b);
int posix_spawn_wrapper(const char *path, char *const *argv, char *const *envp, pid_t *ret_pid);