Commit ad9814de authored by Tobias Klauser's avatar Tobias Klauser Committed by Brad Fitzpatrick

os: unify supportsCloseOnExec definition

On Darwin and FreeBSD, supportsCloseOnExec is defined in its own file,
even though it is set to true as on other Unices. Drop the separate
definitions but keep the accompanying comments.

Change-Id: Iab1d20e1b2590800f141d54b55a099c9cd7ae57e
Reviewed-on: https://go-review.googlesource.com/97155
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 9cae3aaf
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package os
// supportsCloseOnExec reports whether the platform supports the
// O_CLOEXEC flag.
// The O_CLOEXEC flag was introduced in OS X 10.7 (Darwin 11.0.0).
// See http://support.apple.com/kb/HT1633.
const supportsCloseOnExec = true
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package os
// supportsCloseOnExec reports whether the platform supports the
// O_CLOEXEC flag.
// The O_CLOEXEC flag was introduced in FreeBSD 8.3.
const supportsCloseOnExec bool = true
......@@ -2,10 +2,13 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build dragonfly linux netbsd openbsd solaris
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
package os
// supportsCloseOnExec reports whether the platform supports the
// O_CLOEXEC flag.
// On Darwin, the O_CLOEXEC flag was introduced in OS X 10.7 (Darwin 11.0.0).
// See http://support.apple.com/kb/HT1633.
// On FreeBSD, the O_CLOEXEC flag was introduced in version 8.3.
const supportsCloseOnExec = true
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment