os/exec: make sure file is not closed early in leaked fd test
Without this change, fd3 can be collected by the garbage collector and finalized, which causes the file descriptor to be closed, which causes the call to os.Open to return 3 rather than the expected descriptor number. R=golang-dev, gri, bradfitz, bradfitz, iant CC=golang-dev https://golang.org/cl/5607056
Showing
Please
register
or
sign in
to comment