Skip to content

Commit 0f52292

Browse files
committed
os: don't use wait6 on netbsd
CL 315281 changed the os package use wait6 on netbsd. This seems to be causing frequent test failures as reported in #48789. Revert that change using wait6 on netbsd for now. Updates #13987 Updates #16028 For #48789 Change-Id: Ieddffc65611c7f449971eaa8ed6f4299a5f742c2 Reviewed-on: https://go-review.googlesource.com/c/go/+/354249 Trust: Tobias Klauser <[email protected]> Trust: Bryan C. Mills <[email protected]> Trust: Benny Siegert <[email protected]> Run-TryBot: Tobias Klauser <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Bryan C. Mills <[email protected]> Reviewed-by: Benny Siegert <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent 4ab3c10 commit 0f52292

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

src/os/wait_unimp.go

+9-3
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,22 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
//go:build aix || darwin || (js && wasm) || openbsd || solaris
6-
// +build aix darwin js,wasm openbsd solaris
5+
// aix, darwin, js/wasm, openbsd and solaris don't implement
6+
// waitid/wait6. netbsd implements wait6, but that is causing test
7+
// failures, see issue #48789.
8+
9+
//go:build aix || darwin || (js && wasm) || netbsd || openbsd || solaris
10+
// +build aix darwin js,wasm netbsd openbsd solaris
711

812
package os
913

1014
// blockUntilWaitable attempts to block until a call to p.Wait will
1115
// succeed immediately, and reports whether it has done so.
1216
// It does not actually call p.Wait.
1317
// This version is used on systems that do not implement waitid,
14-
// or where we have not implemented it yet.
18+
// or where we have not implemented it yet. Note that this is racy:
19+
// a call to Process.Signal can in an extremely unlikely case send a
20+
// signal to the wrong process, see issue #13987.
1521
func (p *Process) blockUntilWaitable() (bool, error) {
1622
return false, nil
1723
}

src/os/wait_wait6.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
//go:build dragonfly || freebsd || netbsd
6-
// +build dragonfly freebsd netbsd
5+
//go:build dragonfly || freebsd
6+
// +build dragonfly freebsd
77

88
package os
99

0 commit comments

Comments
 (0)