mirror of https://github.com/golang/go.git
doc: document os/exec changes on Windows
For #61422. Updates #62596. Updates #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>
This commit is contained in:
parent
ba7c4e47b3
commit
59275e266a
|
|
@ -650,11 +650,22 @@ defer func() {
|
|||
<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
|
||||
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 -->
|
||||
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
|
||||
<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 -->
|
||||
|
|
|
|||
Loading…
Reference in New Issue