From: Ian Lance Taylor Date: Tue, 5 Oct 2021 22:29:50 +0000 (-0700) Subject: cmd/go: use os.ErrProcessDone rather than matching error string X-Git-Tag: go1.18beta1~1029 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=ac60900759c29d9c06d9fe131825c4677e47d6a1;p=gostls13.git cmd/go: use os.ErrProcessDone rather than matching error string Change-Id: Ied57fb6e71d56618d46aeb36a37a709e08b4346e Reviewed-on: https://go-review.googlesource.com/c/go/+/354136 Trust: Ian Lance Taylor Run-TryBot: Ian Lance Taylor TryBot-Result: Go Bot Reviewed-by: Bryan C. Mills --- diff --git a/src/cmd/go/script_test.go b/src/cmd/go/script_test.go index 3c5855bd6f..17782420c7 100644 --- a/src/cmd/go/script_test.go +++ b/src/cmd/go/script_test.go @@ -1172,7 +1172,7 @@ func waitOrStop(ctx context.Context, cmd *exec.Cmd, interrupt os.Signal, killDel err := cmd.Process.Signal(interrupt) if err == nil { err = ctx.Err() // Report ctx.Err() as the reason we interrupted. - } else if err.Error() == "os: process already finished" { + } else if err == os.ErrProcessDone { errc <- nil return }