]> Cypherpunks repositories - gostls13.git/commitdiff
os: drop special case for FreeBSD 10.4 in newFile
authorTobias Klauser <tklauser@distanz.ch>
Thu, 7 Mar 2019 07:41:02 +0000 (08:41 +0100)
committerTobias Klauser <tobias.klauser@gmail.com>
Tue, 12 Mar 2019 06:33:01 +0000 (06:33 +0000)
Support for FreeBSD 10 will be dropped with Go 1.13, so revert the
workaround introduced in CL 157099.

Updates #29633
Updates #27619

Change-Id: I1a2e50d3f807a411389f3db07c0f4535a590da02
Reviewed-on: https://go-review.googlesource.com/c/go/+/165801
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/os/file_unix.go

index 857cbdb68d87ad8afd918853345c961b48eef6a6..4b62abfb5cd05256bd90ee6ab1f93740b41df00d 100644 (file)
@@ -123,15 +123,7 @@ func newFile(fd uintptr, name string, kind newFileKind) *File {
        if kind == kindOpenFile {
                var st syscall.Stat_t
                switch runtime.GOOS {
-               case "freebsd":
-                       // On FreeBSD before 10.4 it used to crash the
-                       // system unpredictably while running all.bash.
-                       // When we stop supporting FreeBSD 10 we can merge
-                       // this into the dragonfly/netbsd/openbsd case.
-                       // Issue 27619.
-                       pollable = false
-
-               case "dragonfly", "netbsd", "openbsd":
+               case "dragonfly", "freebsd", "netbsd", "openbsd":
                        // Don't try to use kqueue with regular files on *BSDs.
                        // On FreeBSD a regular file is always
                        // reported as ready for writing.