Skip to content

Commit

Permalink
doc: document os/exec changes on Windows
Browse files Browse the repository at this point in the history
For golang#61422.
Updates golang#62596.
Updates golang#61493.

Change-Id: I5c910f9961da24d90b3618ee53540118db06ff91
Reviewed-on: https://go-review.googlesource.com/c/go/+/548481
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
  • Loading branch information
Bryan C. Mills authored and ezz-no committed Feb 17, 2024
1 parent eae6c60 commit 762f394
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions doc/go1.22.html
Original file line number Diff line number Diff line change
Expand Up @@ -650,11 +650,22 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
<dl id="os/exec"><dt><a href="/pkg/os/exec/">os/exec</a></dt>
<dd>
<p><!-- CL 528037 -->
TODO: <a href="https://go.dev/cl/528037">https://go.dev/cl/528037</a>: os/exec: fix edge cases in Windows PATH resolution
</p>

<p><!-- CL 528038 -->
TODO: <a href="https://go.dev/cl/528038">https://go.dev/cl/528038</a>: os/exec: avoid calling LookPath in cmd.Start for resolved paths
On Windows, <a href="/pkg/os/exec#LookPath"><code>LookPath</code> now
ignores empty entries in <code>%PATH%</code>, and returns
<code>ErrNotFound</code> (instead of <code>ErrNotExist</code>) if
no executable file extension is found to resolve an otherwise-unambiguous
name.
</p>

<p><!-- CL 528038, CL 527820 -->
On Windows, <a href="/pkg/os/exec#Command"><code>Command</code></a> and
<a href="/pkg/os/exec#Cmd.Start"><code>Cmd.Start</code></a> no
longer call <code>LookPath</code> if the path to the executable is already
absolute and has an executable file extension. In addition,
<code>Cmd.Start</code> no longer writes the resolved extension back to
the <a href="/pkg/os/exec#Cmd.Path"><code>Path</code></a> field,
so it is now safe to call the <code>String</code> method concurrently
with a call to <code>Start</code>.
</p>
</dd>
</dl><!-- os/exec -->
Expand Down

0 comments on commit 762f394

Please sign in to comment.