aboutsummaryrefslogtreecommitdiff
path: root/src/os/exec/exec.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/exec/exec.go')
-rw-r--r--src/os/exec/exec.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/os/exec/exec.go b/src/os/exec/exec.go
index e5bf97a188..26ddfe633c 100644
--- a/src/os/exec/exec.go
+++ b/src/os/exec/exec.go
@@ -929,6 +929,9 @@ func (e *ExitError) Error() string {
// If any of c.Stdin, c.Stdout or c.Stderr are not an [*os.File], Wait also waits
// for the respective I/O loop copying to or from the process to complete.
//
+// Wait must not be called concurrently from multiple goroutines.
+// A custom Cmd.Cancel function should not call Wait.
+//
// Wait releases any resources associated with the [Cmd].
func (c *Cmd) Wait() error {
if c.Process == nil {