aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/os/exec/exec_test.go
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@golang.org>2011-12-20 15:41:37 -0800
committerBrad Fitzpatrick <bradfitz@golang.org>2011-12-20 15:41:37 -0800
commit1dfe3d1f6e510e7c62cf74240a53d26131042049 (patch)
tree370b68e391d871983c0b289611c8bde427a9dbfa /src/pkg/os/exec/exec_test.go
parent0735e06cfd9b7e132589f555eca3ab72f26d6e91 (diff)
downloadgo-1dfe3d1f6e510e7c62cf74240a53d26131042049.tar.xz
os: don't trust O_CLOEXEC on OS X
OS X 10.6 doesn't do O_CLOEXEC. OS X 10.7 does. For now, always fall back to using syscall.CloseOnExec on darwin. This can removed when 10.6 is old news, or if we find a way to cheaply & reliably detect 10.6 vs 10.7 at runtime. Fixes #2587 R=golang-dev, rsc, iant CC=golang-dev https://golang.org/cl/5500053
Diffstat (limited to 'src/pkg/os/exec/exec_test.go')
-rw-r--r--src/pkg/os/exec/exec_test.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/pkg/os/exec/exec_test.go b/src/pkg/os/exec/exec_test.go
index 0358441f86..2b4166cc3e 100644
--- a/src/pkg/os/exec/exec_test.go
+++ b/src/pkg/os/exec/exec_test.go
@@ -256,8 +256,9 @@ func TestHelperProcess(*testing.T) {
fmt.Printf("ReadAll from fd 3: %v", err)
os.Exit(1)
}
- // TODO(bradfitz,iant): the rest of this test is disabled
- // for now. remove this block once we figure out why it fails.
+ // TODO(bradfitz): remove this block once the builders are restarted
+ // with a new binary including be47ea17bea0 (set CLOEXEC on epoll/kqueue fds)
+ // and 5500053 (don't trust O_CLOEXEC on OS X).
{
os.Stderr.Write(bs)
os.Exit(0)