go/src/os/exec
Dmitri Shuralyov ea96074191 [release-branch.go1.22] os/exec: only use cachedLookExtensions if Cmd.Path is unmodified
Caching the invocation of lookExtensions on an absolute path in Command
and reusing the cached result in Start is only viable if Cmd.Path isn't
set to a different value after Command returns.

For #66586.
For #68314.
Fixes #68331.

Change-Id: I57007850aca2011b11344180c00faded737617b5
Reviewed-on: https://go-review.googlesource.com/c/go/+/596875
Reviewed-by: qiu laidongfeng2 <2645477756@qq.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
(cherry picked from commit d0146bd85b)
Reviewed-on: https://go-review.googlesource.com/c/go/+/596976
2024-07-10 19:24:54 +00:00
..
internal/fdtest os: add wasip1 support 2023-04-07 23:34:21 +00:00
bench_test.go
dot_test.go os/exec: simplify Windows-specific tests 2023-09-13 18:19:21 +00:00
env_test.go
example_test.go
exec.go [release-branch.go1.22] os/exec: only use cachedLookExtensions if Cmd.Path is unmodified 2024-07-10 19:24:54 +00:00
exec_linux_test.go
exec_other_test.go
exec_plan9.go
exec_posix_test.go
exec_test.go [release-branch.go1.22] os/exec: only use cachedLookExtensions if Cmd.Path is unmodified 2024-07-10 19:24:54 +00:00
exec_unix.go
exec_unix_test.go
exec_windows.go
exec_windows_test.go os: use testenv.Command instead of exec.Command in tests 2023-02-21 23:07:55 +00:00
internal_test.go
lp_linux_test.go os/exec: adjust function name in fatal message 2023-09-18 17:02:50 +00:00
lp_plan9.go os/exec: avoid calling LookPath in cmd.Start for resolved paths 2023-09-13 19:38:12 +00:00
lp_test.go
lp_unix.go os/exec: avoid calling LookPath in cmd.Start for resolved paths 2023-09-13 19:38:12 +00:00
lp_unix_test.go os/exec: simplify Windows-specific tests 2023-09-13 18:19:21 +00:00
lp_wasm.go os/exec: avoid calling LookPath in cmd.Start for resolved paths 2023-09-13 19:38:12 +00:00
lp_windows.go os/exec: avoid calling LookPath in cmd.Start for resolved paths 2023-09-13 19:38:12 +00:00
lp_windows_test.go os/exec: avoid calling LookPath in cmd.Start for resolved paths 2023-09-13 19:38:12 +00:00
read3.go