Index: include/unistd.h =================================================================== --- include/unistd.h (revision 179921) +++ include/unistd.h (working copy) @@ -335,7 +335,6 @@ int execv(const char *, char * const *); int execve(const char *, char * const *, char * const *); int execvp(const char *, char * const *); -int execvpe(const char *, char * const *, char * const *); pid_t fork(void); long fpathconf(int, int); char *getcwd(char *, size_t); Index: lib/libc/gen/exec.3 =================================================================== --- lib/libc/gen/exec.3 (revision 179921) +++ lib/libc/gen/exec.3 (working copy) @@ -38,7 +38,6 @@ .Nm exect , .Nm execv , .Nm execvp , -.Nm execvpe , .Nm execvP .Nd execute a file .Sh LIBRARY @@ -65,8 +64,6 @@ .Ft int .Fn execvp "const char *file" "char *const argv[]" .Ft int -.Fn execvpe "const char *file" "char *const argv[]" "char *const envp[]" -.Ft int .Fn execvP "const char *file" "const char *search_path" "char *const argv[]" .Sh DESCRIPTION The @@ -121,10 +118,9 @@ pointer. .Pp The -.Fn execle , -.Fn exect +.Fn execle and -.Fn execvpe +.Fn exect functions also specify the environment of the executed process by following the .Dv NULL @@ -146,7 +142,6 @@ The functions .Fn execlp , .Fn execvp , -.Fn execvpe , and .Fn execvP will duplicate the actions of the shell in searching for an executable file @@ -157,7 +152,6 @@ .Fn execlp and .Fn execvp , -.Fn execvpe , search path is the path specified in the environment by .Dq Ev PATH variable. @@ -283,8 +277,7 @@ .Fn execl , .Fn execle , .Fn execlp , -.Fn execvp , -.Fn execvpe +.Fn execvp and .Fn execvP functions @@ -326,7 +319,3 @@ .Fn execvP function first appeared in .Fx 5.2 . -The -.Fn execvpe -function first appeared in -.Fx 8.0 . Index: lib/libc/gen/posix_spawn.c =================================================================== --- lib/libc/gen/posix_spawn.c (revision 179921) +++ lib/libc/gen/posix_spawn.c (working copy) @@ -39,6 +39,7 @@ #include #include #include "un-namespace.h" +#include "libc_private.h" extern char **environ; @@ -212,7 +213,7 @@ _exit(127); } if (use_env_path) - execvpe(path, argv, envp != NULL ? envp : environ); + _execvpe(path, argv, envp != NULL ? envp : environ); else _execve(path, argv, envp != NULL ? envp : environ); error = errno; Index: lib/libc/gen/exec.c =================================================================== --- lib/libc/gen/exec.c (revision 179921) +++ lib/libc/gen/exec.c (working copy) @@ -46,6 +46,7 @@ #include #include "un-namespace.h" +#include "libc_private.h" extern char **environ; @@ -140,7 +141,7 @@ int execvp(const char *name, char * const *argv) { - return (execvpe(name, argv, environ)); + return (_execvpe(name, argv, environ)); } static int @@ -272,7 +273,7 @@ } int -execvpe(const char *name, char * const argv[], char * const envp[]) +_execvpe(const char *name, char * const argv[], char * const envp[]) { const char *path; Index: lib/libc/include/libc_private.h =================================================================== --- lib/libc/include/libc_private.h (revision 179921) +++ lib/libc/include/libc_private.h (working copy) @@ -195,4 +195,7 @@ /* Without back-compat translation */ extern int __sys_fcntl(int, int, ...); +/* execve() with PATH processing to implement posix_spawnp() */ +int _execvpe(const char *, char * const *, char * const *); + #endif /* _LIBC_PRIVATE_H_ */