]> Cypherpunks repositories - gostls13.git/commitdiff
os: use wait6 to avoid wait/kill race on netbsd
authorTobias Klauser <tklauser@distanz.ch>
Mon, 19 Sep 2022 15:21:20 +0000 (17:21 +0200)
committerGopher Robot <gobot@golang.org>
Mon, 19 Sep 2022 18:44:37 +0000 (18:44 +0000)
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>

src/os/wait_unimp.go
src/os/wait_wait6.go

index 721b9f9f7e33233a07d3c965504d7fdc6f0c707b..bc93e44cf96c700ac681814c33fdf4bbce15c597 100644 (file)
@@ -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
 
index d395dac40b491b124a1756a190e320f170b0698d..1464576b7cf40f972ddb5c52b3bf2e233136b370 100644 (file)
@@ -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