All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] exec.3: Clarify that execvpe uses PATH from the caller, not envp
@ 2021-03-19 23:57 Alejandro Colomar
  2021-04-04 20:10 ` Michael Kerrisk (man-pages)
  0 siblings, 1 reply; 2+ messages in thread
From: Alejandro Colomar @ 2021-03-19 23:57 UTC (permalink / raw)
  To: mtk.manpages; +Cc: Josh Triplett, linux-man, Alejandro Colomar

From: Josh Triplett <josh@joshtriplett.org>

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>
---
 man3/exec.3 | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/man3/exec.3 b/man3/exec.3
index 3d936d08d..9c5b02b5c 100644
--- a/man3/exec.3
+++ b/man3/exec.3
@@ -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.
-- 
2.30.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] exec.3: Clarify that execvpe uses PATH from the caller, not envp
  2021-03-19 23:57 [PATCH] exec.3: Clarify that execvpe uses PATH from the caller, not envp Alejandro Colomar
@ 2021-04-04 20:10 ` Michael Kerrisk (man-pages)
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Kerrisk (man-pages) @ 2021-04-04 20:10 UTC (permalink / raw)
  To: Alejandro Colomar; +Cc: mtk.manpages, Josh Triplett, linux-man

Hi Alex,

On 3/20/21 12:57 AM, Alejandro Colomar wrote:
> From: Josh Triplett <josh@joshtriplett.org>
> 
> 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

> Signed-off-by: Josh Triplett <josh@joshtriplett.org>
> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
> ---
>  man3/exec.3 | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/man3/exec.3 b/man3/exec.3
> index 3d936d08d..9c5b02b5c 100644
> --- a/man3/exec.3
> +++ b/man3/exec.3
> @@ -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.
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-04 20:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-19 23:57 [PATCH] exec.3: Clarify that execvpe uses PATH from the caller, not envp Alejandro Colomar
2021-04-04 20:10 ` Michael Kerrisk (man-pages)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.