Hook execvpe(), a GNU extension.

This commit is contained in:
Simon Ruderich
2013-06-10 17:10:44 +02:00
parent 55e8d0d38a
commit 237251ae9c
4 changed files with 53 additions and 0 deletions

View File

@@ -536,3 +536,13 @@ int execvp(char const *file, char * const argv[]) {
update_environment();
return real_execvp(file, argv);
}
#ifdef HAVE_EXECVPE
extern char **environ;
int execvpe(char const *file, char * const argv[], char * const envp[]) {
/* Fake the environment so we can reuse execvp(). */
environ = (char **)envp;
return execvp(file, argv);
}
#endif