[go] os/exec: document that Cmd.Wait must not be called concurrently

0 views
Skip to first unread message

Gopher Robot (Gerrit)

unread,
Mar 17, 2026, 2:58:37 PM (yesterday) Mar 17
to Basavaraj P, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Mark Freeman, Carlos Amedee, Go LUCI, Ian Lance Taylor, golang-co...@googlegroups.com

Gopher Robot submitted the change

Change information

Commit message:
os/exec: document that Cmd.Wait must not be called concurrently

Clarify in the Wait documentation that it must not be called
concurrently from multiple goroutines. Also note that a custom
Cmd.Cancel function should not call Wait because Cancel may be
invoked by watchCtx in a separate goroutine.

Fixes #78046
Change-Id: I5c0ebc41bd3c39c78f3b37539c59cdfedfd90e72
Reviewed-by: Ian Lance Taylor <ia...@golang.org>
Reviewed-by: Carlos Amedee <car...@golang.org>
Auto-Submit: Ian Lance Taylor <ia...@golang.org>
Reviewed-by: Mark Freeman <markf...@google.com>
Files:
  • M src/os/exec/exec.go
Change size: XS
Delta: 1 file changed, 3 insertions(+), 0 deletions(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +2 by Ian Lance Taylor, +1 by Carlos Amedee, +1 by Mark Freeman
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I5c0ebc41bd3c39c78f3b37539c59cdfedfd90e72
Gerrit-Change-Number: 753602
Gerrit-PatchSet: 3
Gerrit-Owner: Basavaraj P <basavaraj...@gmail.com>
Gerrit-Reviewer: Basavaraj P <basavaraj...@gmail.com>
Gerrit-Reviewer: Carlos Amedee <car...@golang.org>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Ian Lance Taylor <ia...@golang.org>
Gerrit-Reviewer: Mark Freeman <markf...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages