@@ -160,6 +160,19 @@ int posix_spawn(pid_t * pid, const char * path,
160160 return posix_spawn_real(pid, rewrite(path, buf), file_actions, attrp, argv, envp);
161161}
162162
163+int posix_spawnp(pid_t * pid, const char * file,
164+ const posix_spawn_file_actions_t * file_actions,
165+ const posix_spawnattr_t * attrp,
166+ char * const argv[], char * const envp[])
167+{
168+ int (*posix_spawnp_real) (pid_t *, const char *,
169+ const posix_spawn_file_actions_t *,
170+ const posix_spawnattr_t *,
171+ char * const argv[], char * const envp[]) = dlsym(RTLD_NEXT, "posix_spawnp");
172+ char buf[PATH_MAX];
173+ return posix_spawnp_real(pid, rewrite(file, buf), file_actions, attrp, argv, envp);
174+}
175+
163176int execv(const char *path, char *const argv[])
164177{
165178 int (*execv_real) (const char *path, char *const argv[]) = dlsym(RTLD_NEXT, "execv");