New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
net: enable socket creation w/ close-on-exec on freebsd #7186
Labels
Milestone
Comments
Sure, thanks. --- a/src/pkg/net/sock_bsd.go +++ b/src/pkg/net/sock_bsd.go +func probeSocketLayer() bool { + switch runtime.GOOS { + case "freebsd": + // The SOCK_NONBLOCK and SOCK_CLOEXEC flags were introduced in + // FreeBSD 10. + if osrel, err := syscall.SysctlUint32("kern.osreldate"); err == nil { + // See http://www.freebsd.org/doc/en/books/porters-handbook/freebsd-versions.html. + if osrel >= 1000000 { + return true + } + } + return false + default: + return false + } +} |
This issue was updated by revision d9fc789. LGTM=iant R=iant CC=golang-codereviews https://golang.org/cl/70490043 |
This issue was updated by revision a918c2c. Update issue #7428 LGTM=r, bradfitz R=golang-codereviews, rsc, minux.ma, r, bradfitz CC=golang-codereviews https://golang.org/cl/68880043 |
This issue was closed by revision 1d086e3. Status changed to Fixed. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: