master
 1#include <spawn.h>
 2#include <unistd.h>
 3
 4int posix_spawnp(pid_t *restrict res, const char *restrict file,
 5	const posix_spawn_file_actions_t *fa,
 6	const posix_spawnattr_t *restrict attr,
 7	char *const argv[restrict], char *const envp[restrict])
 8{
 9	posix_spawnattr_t spawnp_attr = { 0 };
10	if (attr) spawnp_attr = *attr;
11	spawnp_attr.__fn = (void *)__execvpe;	
12	return posix_spawn(res, file, fa, &spawnp_attr, argv, envp);
13}