From d74bf73be052851e83fb59a40f47d49f4b890ca3 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Mon, 19 Sep 2022 17:21:20 +0200 Subject: [PATCH] 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 Auto-Submit: Tobias Klauser Run-TryBot: Tobias Klauser Reviewed-by: Bryan Mills TryBot-Result: Gopher Robot --- src/os/wait_unimp.go | 2 +- src/os/wait_wait6.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/os/wait_unimp.go b/src/os/wait_unimp.go index 721b9f9f7e..bc93e44cf9 100644 --- a/src/os/wait_unimp.go +++ b/src/os/wait_unimp.go @@ -6,7 +6,7 @@ // waitid/wait6. netbsd implements wait6, but that is causing test // failures, see issue #48789. -//go:build aix || darwin || (js && wasm) || netbsd || openbsd || solaris +//go:build aix || darwin || (js && wasm) || openbsd || solaris package os diff --git a/src/os/wait_wait6.go b/src/os/wait_wait6.go index d395dac40b..1464576b7c 100644 --- a/src/os/wait_wait6.go +++ b/src/os/wait_wait6.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build dragonfly || freebsd +//go:build dragonfly || freebsd || netbsd package os