aboutsummaryrefslogtreecommitdiff
path: root/src/syscall/exec_freebsd.go
diff options
context:
space:
mode:
authorMikio Hara <mikioh.mikioh@gmail.com>2017-08-19 13:46:48 +0900
committerBrad Fitzpatrick <bradfitz@golang.org>2017-11-28 18:57:25 +0000
commite76ae8af9279ad3efc9c25ff7bb220114b70de80 (patch)
tree010595eba036bc2be67d35a1d4b241557acc88e1 /src/syscall/exec_freebsd.go
parent9a13f8e11ce487fccef071303164b3d963e6ede6 (diff)
downloadgo-e76ae8af9279ad3efc9c25ff7bb220114b70de80.tar.xz
all: drop support for FreeBSD 9 or below
This change drops the support for FreeBSD 9 or below and simplifies platform-dependent code for the sake of maintenance. Updates #7187. Fixes #11412. Updates #16064. Updates #18854. Fixes #19072. Change-Id: I9129130aafbfc7d0d7e9b674b6fc6cb31b7381be Reviewed-on: https://go-review.googlesource.com/64910 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/syscall/exec_freebsd.go')
-rw-r--r--src/syscall/exec_freebsd.go18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/syscall/exec_freebsd.go b/src/syscall/exec_freebsd.go
index 4ed32c0614..1654b4ba2a 100644
--- a/src/syscall/exec_freebsd.go
+++ b/src/syscall/exec_freebsd.go
@@ -5,21 +5,5 @@
package syscall
func forkExecPipe(p []int) error {
- err := Pipe2(p, O_CLOEXEC)
- if err == nil {
- return nil
- }
-
- // FreeBSD 9 fallback.
- // TODO: remove this for Go 1.10 per Issue 19072
- err = Pipe(p)
- if err != nil {
- return err
- }
- _, err = fcntl(p[0], F_SETFD, FD_CLOEXEC)
- if err != nil {
- return err
- }
- _, err = fcntl(p[1], F_SETFD, FD_CLOEXEC)
- return err
+ return Pipe2(p, O_CLOEXEC)
}