|
|
|
|
|
by lgg
1057 days ago
|
|
posix_spawn() is specified such that it is possible (but does not required!) it to be implemented in terms of [v]fork() and exec(). On macOS it is a syscall and is generally faster than using vfork() and exec(). It also has a number of extensions like POSIX_SPAWN_CLOEXEC_DEFAULT, POSIX_SPAWN_SETEXEC, and `posix_spawn_file_actions_addchdir_np()` that allow it to actually be used in many cases where other systems need to resort to fork() and exec(). |
|