* [PATCH 1/2] exec.3: Fix description of 'e' variants
@ 2021-03-07 23:00 Josh Triplett
2021-03-07 23:01 ` [PATCH 2/2] exec.3: Clarify that execvpe uses PATH from the caller, not envp Josh Triplett
2021-03-10 19:25 ` [PATCH 1/2] exec.3: Fix description of 'e' variants Alejandro Colomar (man-pages)
0 siblings, 2 replies; 3+ messages in thread
From: Josh Triplett @ 2021-03-07 23:00 UTC (permalink / raw)
To: linux-man, Alejandro Colomar, Michael Kerrisk
The envp argument specifies the environment of the new process image,
not "the environment of the caller".
Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
man3/exec.3 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/man3/exec.3 b/man3/exec.3
index 211e06421..3d936d08d 100644
--- a/man3/exec.3
+++ b/man3/exec.3
@@ -116,7 +116,7 @@ The array of pointers
.I must
be terminated by a null pointer.
.SS e - execle(), execvpe()
-The environment of the caller is specified via the argument
+The environment of the new process image is specified via the argument
.IR envp .
The
.I envp
--
2.30.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] exec.3: Clarify that execvpe uses PATH from the caller, not envp
2021-03-07 23:00 [PATCH 1/2] exec.3: Fix description of 'e' variants Josh Triplett
@ 2021-03-07 23:01 ` Josh Triplett
2021-03-10 19:25 ` [PATCH 1/2] exec.3: Fix description of 'e' variants Alejandro Colomar (man-pages)
1 sibling, 0 replies; 3+ messages in thread
From: Josh Triplett @ 2021-03-07 23:01 UTC (permalink / raw)
To: linux-man, Alejandro Colomar, Michael Kerrisk
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>
---
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] 3+ messages in thread
* Re: [PATCH 1/2] exec.3: Fix description of 'e' variants
2021-03-07 23:00 [PATCH 1/2] exec.3: Fix description of 'e' variants Josh Triplett
2021-03-07 23:01 ` [PATCH 2/2] exec.3: Clarify that execvpe uses PATH from the caller, not envp Josh Triplett
@ 2021-03-10 19:25 ` Alejandro Colomar (man-pages)
1 sibling, 0 replies; 3+ messages in thread
From: Alejandro Colomar (man-pages) @ 2021-03-10 19:25 UTC (permalink / raw)
To: Josh Triplett, linux-man, Michael Kerrisk
Hello Josh,
On 3/8/21 12:00 AM, Josh Triplett wrote:
> The envp argument specifies the environment of the new process image,
> not "the environment of the caller".
>
> Signed-off-by: Josh Triplett <josh@joshtriplett.org>
I applied both patches.
Thanks,
Alex
> ---
> man3/exec.3 | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/man3/exec.3 b/man3/exec.3
> index 211e06421..3d936d08d 100644
> --- a/man3/exec.3
> +++ b/man3/exec.3
> @@ -116,7 +116,7 @@ The array of pointers
> .I must
> be terminated by a null pointer.
> .SS e - execle(), execvpe()
> -The environment of the caller is specified via the argument
> +The environment of the new process image is specified via the argument
> .IR envp .
> The
> .I envp
>
--
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-03-10 19:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-07 23:00 [PATCH 1/2] exec.3: Fix description of 'e' variants Josh Triplett
2021-03-07 23:01 ` [PATCH 2/2] exec.3: Clarify that execvpe uses PATH from the caller, not envp Josh Triplett
2021-03-10 19:25 ` [PATCH 1/2] exec.3: Fix description of 'e' variants Alejandro Colomar (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.