Commit 1946afb6 authored by David du Colombier's avatar David du Colombier

os/exec: fix number of expected file descriptors on Plan 9

Since CL 104570043 and 112720043, we are using the
nsec system call instead of /dev/bintime on Plan 9.

LGTM=rsc
R=rsc
CC=aram, golang-codereviews
https://golang.org/cl/155590043
parent 9070afb3
......@@ -258,15 +258,7 @@ var testedAlreadyLeaked = false
// basefds returns the number of expected file descriptors
// to be present in a process at start.
func basefds() uintptr {
n := os.Stderr.Fd() + 1
// Go runtime for 32-bit Plan 9 requires that /dev/bintime
// be kept open.
// See ../../runtime/time_plan9_386.c:/^runtime·nanotime
if runtime.GOOS == "plan9" && runtime.GOARCH == "386" {
n++
}
return n
return os.Stderr.Fd() + 1
}
func closeUnexpectedFds(t *testing.T, m string) {
......
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