exec.3: Clarify that execvpe uses PATH from the caller, not envp
PATCH 1/1 exec.3: Clarify that execvpe uses PATH from the caller, not envp
From: Josh Triplett <[email protected]>
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 <[email protected]>
Signed-off-by Alejandro Colomar <[email protected]>
--- man3/exec.3 | 7 +++++++ 1 file changed, 7 insertions(+)
man3/exec.3 +7 -0
@@ -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.
Signature · 1 line
2.30.1
Hi Alex,
Quoted 4 lines · Alejandro Colomar
From: Josh Triplett <[email protected]>
Checked via the latest glibc source. execvpe calls
getenv("PATH")and searches that; the PATH in envp does not affect the search.
Thanks. Patch applied.
Cheers,
Michael
Quoted 25 lines
Signed-off-by Josh Triplett <[email protected]>Signed-off-by Alejandro Colomar <[email protected]>--- man3/exec.3 | 7 +++++++ 1 file changed, 7 insertions(+)man3/exec.3 +7
-0@@ -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.
Signature · 3 lines
Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/