mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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>
This commit is contained in:
parent
177306f630
commit
53a4152d47
1 changed files with 2 additions and 2 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue