exec.3: Clarify that execvpe uses PATH from the caller, not envp

Checked via the latest glibc source. execvpe calls getenv("PATH") and
searches that; the PATH in envp does not affect the search.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Josh Triplett 2021-03-20 00:57:16 +01:00 committed by Michael Kerrisk
parent 8e2cab90e1
commit 21bc0c8713
1 changed files with 7 additions and 0 deletions

View File

@ -146,6 +146,13 @@ a list that includes the directories returned by
and possibly also the current working directory;
see NOTES for further details.
.PP
.BR execvpe ()
searches for the program using the value of
.B PATH
from the caller's environment, not from the
.I envp
argument.
.PP
If the specified filename includes a slash character, then
.B PATH
is ignored, and the file at the specified pathname is executed.