diff options
| author | Brad Fitzpatrick <bradfitz@golang.org> | 2017-03-21 10:23:08 -0700 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2017-03-21 20:01:23 +0000 |
| commit | 0ebaca6ba27534add5930a95acffa9acff182e2b (patch) | |
| tree | f77906c731c0947f4c483cd8db2698980d6ccbf6 /src/syscall/exec_bsd.go | |
| parent | 051cbf3f3720086ec6d3fd159a234bae3ffd12ef (diff) | |
| download | go-0ebaca6ba27534add5930a95acffa9acff182e2b.tar.xz | |
syscall, os: use pipe2 syscall on FreeBSD instead of pipe
The pipe2 syscall exists in all officially supported FreeBSD
versions: 10, 11 and future 12.
The pipe syscall no longer exists in 11 and 12. To build and
run Go on these versions, kernel needs COMPAT_FREEBSD10 option.
Based on Gleb Smirnoff's https://golang.org/cl/38422
Fixes #18854
Change-Id: I8e201ee1b15dca10427c3093b966025d160aaf61
Reviewed-on: https://go-review.googlesource.com/38426
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/syscall/exec_bsd.go')
| -rw-r--r-- | src/syscall/exec_bsd.go | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/syscall/exec_bsd.go b/src/syscall/exec_bsd.go index 31a4099559..730b63d1e5 100644 --- a/src/syscall/exec_bsd.go +++ b/src/syscall/exec_bsd.go @@ -256,17 +256,3 @@ childerror: RawSyscall(SYS_EXIT, 253, 0, 0) } } - -// Try to open a pipe with O_CLOEXEC set on both file descriptors. -func forkExecPipe(p []int) error { - 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 -} |
