aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2022-06-24 14:34:28 -0700
committerIan Lance Taylor <iant@golang.org>2022-07-06 16:51:00 +0000
commit53a4152d478d75ef4b71e428b9d69ed54144081f (patch)
tree38e0e3815dad12c63e838e275c161ffcc94aa0c2
parent177306f6305b35bf6993c2d74baa7fb60cd3f5d4 (diff)
downloadgo-53a4152d478d75ef4b71e428b9d69ed54144081f.tar.gz
go-53a4152d478d75ef4b71e428b9d69ed54144081f.zip
os/exec: clarify that Wait must be called
Fixes #52580 Change-Id: Ib2dd8a793b9c6fcb083abb3f7c346f6279adefc9 Reviewed-on: https://go-review.googlesource.com/c/go/+/414056 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Alan Donovan <adonovan@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
-rw-r--r--src/os/exec/exec.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/os/exec/exec.go b/src/os/exec/exec.go
index f0dc7dab7d..57d18420bb 100644
--- a/src/os/exec/exec.go
+++ b/src/os/exec/exec.go
@@ -462,8 +462,8 @@ func lookExtensions(path, dir string) (string, error) {
//
// If Start returns successfully, the c.Process field will be set.
//
-// The Wait method will return the exit code and release associated resources
-// once the command exits.
+// After a successful call to Start the Wait method must be called in
+// order to release associated system resources.
func (c *Cmd) Start() error {
if c.Path == "" && c.Err == nil && c.lookPathErr == nil {
c.Err = errors.New("exec: no command")