]> Cypherpunks repositories - gostls13.git/commit
os/exec: make sure file is not closed early in leaked fd test
authorIan Lance Taylor <iant@golang.org>
Thu, 2 Feb 2012 00:37:02 +0000 (16:37 -0800)
committerIan Lance Taylor <iant@golang.org>
Thu, 2 Feb 2012 00:37:02 +0000 (16:37 -0800)
commit2b8d5be55f0201c3d4047ea8510b168eb37c5074
treedae4e1c70755ca63c3858d1c7d8314235f2bb92c
parentf3f5239d1e3e1acb299ef8a6a907df12713b9626
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
src/pkg/os/exec/exec_test.go