• Ian Lance Taylor's avatar
    syscall: fix creds_test to reliably close os.File · 5611e8b5
    Ian Lance Taylor authored
    Before this patch the test would close the file descriptor but
    not the os.File.  When the os.File was GC'ed, the finalizer
    would close the file descriptor again.  That would cause
    problems if the same file descriptor were returned by a later
    call to open in another test.
    
    On my system:
    
    > GOGC=30 go test
    --- FAIL: TestPassFD (0.04 seconds)
    passfd_test.go:62: 	FileConn: dup: bad file descriptor
    FAIL
    
    R=golang-dev, rsc
    CC=golang-dev
    https://golang.org/cl/6776053
    5611e8b5
Name
Last commit
Last update
..
cmd Loading commit data...
lib9 Loading commit data...
libbio Loading commit data...
libmach Loading commit data...
pkg Loading commit data...
Make.dist Loading commit data...
all.bash Loading commit data...
all.bat Loading commit data...
all.rc Loading commit data...
clean.bash Loading commit data...
clean.bat Loading commit data...
clean.rc Loading commit data...
make.bash Loading commit data...
make.bat Loading commit data...
make.rc Loading commit data...
run.bash Loading commit data...
run.bat Loading commit data...
run.rc Loading commit data...
sudo.bash Loading commit data...