1
0
mirror of https://github.com/golang/go synced 2024-11-12 09:50:21 -07:00

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
This commit is contained in:
David du Colombier 2014-10-20 23:01:32 +02:00
parent 9070afb359
commit 1946afb662

View File

@ -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) {