posix_spawnp.c 607 B

1234567891011121314151617
  1. #include <spawn.h>
  2. #include <unistd.h>
  3. int __execvpe(const char *, char *const *, char *const *);
  4. int __posix_spawnx(pid_t *restrict, const char *restrict,
  5. int (*)(const char *, char *const *, char *const *),
  6. const posix_spawn_file_actions_t *,
  7. const posix_spawnattr_t *restrict, char *const *restrict, char *const *restrict);
  8. int posix_spawnp(pid_t *restrict res, const char *restrict file,
  9. const posix_spawn_file_actions_t *fa,
  10. const posix_spawnattr_t *restrict attr,
  11. char *const argv[restrict], char *const envp[restrict])
  12. {
  13. return __posix_spawnx(res, file, __execvpe, fa, attr, argv, envp);
  14. }