]> Cypherpunks repositories - gostls13.git/commit
syscall: don't defer close raw Socketpair fds in tests
authorTobias Klauser <tklauser@distanz.ch>
Tue, 13 Apr 2021 09:01:13 +0000 (11:01 +0200)
committerTobias Klauser <tobias.klauser@gmail.com>
Wed, 14 Apr 2021 05:49:15 +0000 (05:49 +0000)
commit58fdac04e4534e53fd9ca7df0455efb4f1ddb82b
tree53511cf11e1d4b4cce85d72ae8b2ff32ac978835
parent6d8ba77896d05720e1cb1728c27db60926e672b5
syscall: don't defer close raw Socketpair fds in tests

The raw fds are successively wrapped using os.NewFile and will be closed
by (*os.File).Close. Avoids a double close, in the worst case closing an
unrelated fd.

Change-Id: I86aabe5ed865eff43d264ddae1fb07c935868e97
Reviewed-on: https://go-review.googlesource.com/c/go/+/309353
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/syscall/creds_test.go
src/syscall/syscall_unix_test.go