os: use wait6 to avoid wait/kill race on netbsd

Resend of CL 315281 which was partially reverted by CL 354249 after the
original CL was suspected to cause test failures as reported in #48789.
It seems that both wait4 and wait6 lead to that particular deadlock, so
let's use wait6. That way we at least don't hit #13987 on netbsd.

Updates #13987
For #48789
For #50138

Change-Id: Iadc4a771217b7e9e821502e89afa07036e0dcb6f
Reviewed-on: https://go-review.googlesource.com/c/go/+/431855
Reviewed-by: Benny Siegert <bsiegert@gmail.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
Tobias Klauser 2022-09-19 17:21:20 +02:00 committed by Gopher Robot
parent e283473ebb
commit d74bf73be0
2 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,7 @@
// waitid/wait6. netbsd implements wait6, but that is causing test // waitid/wait6. netbsd implements wait6, but that is causing test
// failures, see issue #48789. // failures, see issue #48789.
//go:build aix || darwin || (js && wasm) || netbsd || openbsd || solaris //go:build aix || darwin || (js && wasm) || openbsd || solaris
package os package os

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
//go:build dragonfly || freebsd //go:build dragonfly || freebsd || netbsd
package os package os