]> Cypherpunks repositories - gostls13.git/commitdiff
os/exec: clarify that Wait must be called
authorIan Lance Taylor <iant@golang.org>
Fri, 24 Jun 2022 21:34:28 +0000 (14:34 -0700)
committerIan Lance Taylor <iant@golang.org>
Wed, 6 Jul 2022 16:51:00 +0000 (16:51 +0000)
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>
src/os/exec/exec.go

index f0dc7dab7dea0adf143c98c99451fb7f664fc874..57d18420bbdcc905de69a8d9ae494a7ee54d3c7c 100644 (file)
@@ -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")