]> Cypherpunks repositories - gostls13.git/commit
os/exec: refactor goroutine communication in Wait
authorBryan C. Mills <bcmills@google.com>
Sat, 23 Apr 2022 03:33:16 +0000 (23:33 -0400)
committerGopher Robot <gobot@golang.org>
Fri, 6 May 2022 22:04:35 +0000 (22:04 +0000)
commit4e79f06dac712d35d67d72777dae6df6d8c97888
treea549a9682bc76944e5c377270dbc27f91bcaa519
parentd7a03da8edf37ee4fa9c1200040db001c6c3e56a
os/exec: refactor goroutine communication in Wait

This provides clearer synchronization invariants: if it occurs at all,
the call to c.Process.Kill always occurs before Wait returns. It also
allows any unexpected errors from the goroutine to be propagated back
to Wait.

For #50436.

Change-Id: I7ddadc73e6e67399596e35393f5845646f6111ab
Reviewed-on: https://go-review.googlesource.com/c/go/+/401896
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/os/exec/exec.go