summaryrefslogtreecommitdiff
path: root/src/os
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2014-11-05 20:25:20 -0800
committerKeith Randall <khr@golang.org>2014-11-05 20:25:20 -0800
commit87a8f70ba7cf934bf5e5f17f69f0a2203cc03563 (patch)
tree3bb168d5c1366f14f09c9200fbb0b192f20ed6e9 /src/os
parent59b899e8639f2b3f3cf931bcff12528c34003cc8 (diff)
downloadgo-87a8f70ba7cf934bf5e5f17f69f0a2203cc03563.tar.gz
os/exec: tell lsof not to block
For some reason lsof is now hanging on my workstation without the -b (avoid blocking in the kernel) option. Adding -b makes the test pass and shouldn't hurt. I don't know how recent the -b option is. If the builders are ok with it, it's probably ok. LGTM=rsc R=golang-codereviews, bradfitz, rsc CC=golang-codereviews https://codereview.appspot.com/166220043
Diffstat (limited to 'src/os')
-rw-r--r--src/os/exec/exec_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/os/exec/exec_test.go b/src/os/exec/exec_test.go
index bc9c00eff..197d3e8b4 100644
--- a/src/os/exec/exec_test.go
+++ b/src/os/exec/exec_test.go
@@ -246,7 +246,7 @@ func TestPipeLookPathLeak(t *testing.T) {
}
func numOpenFDS(t *testing.T) (n int, lsof []byte) {
- lsof, err := exec.Command("lsof", "-n", "-p", strconv.Itoa(os.Getpid())).Output()
+ lsof, err := exec.Command("lsof", "-b", "-n", "-p", strconv.Itoa(os.Getpid())).Output()
if err != nil {
t.Skip("skipping test; error finding or running lsof")
}