use vfork if possible in posix_spawn
[musl] / src / process / posix_spawnp.c
1 #include <spawn.h>
2 #include <unistd.h>
3
4 int __posix_spawnx(pid_t *restrict, const char *restrict,
5         int (*)(const char *, char *const *),
6         const posix_spawn_file_actions_t *,
7         const posix_spawnattr_t *restrict, char *const *restrict, char *const *restrict);
8
9 int posix_spawnp(pid_t *restrict res, const char *restrict file,
10         const posix_spawn_file_actions_t *fa,
11         const posix_spawnattr_t *restrict attr,
12         char *const argv[restrict], char *const envp[restrict])
13 {
14         return __posix_spawnx(res, file, execvp, fa, attr, argv, envp);
15 }