]> Cypherpunks.ru repositories - gostls13.git/commit
net, os: net.Conn.File.Fd should return a blocking descriptor
authorIan Lance Taylor <iant@golang.org>
Fri, 19 May 2023 22:09:58 +0000 (15:09 -0700)
committerGopher Robot <gobot@golang.org>
Sat, 20 May 2023 21:53:52 +0000 (21:53 +0000)
commitb950cc8f11dc31cc9f6cfbed883818a7aa3abe94
tree5b6c10fe3344ccd56da71636014b38cd081c175e
parentd694046152c1772048d0e443fa32c9cff59f2fc2
net, os: net.Conn.File.Fd should return a blocking descriptor

Historically net.Conn.File.Fd has returned a descriptor in blocking mode.
That was broken by CL 495079, which changed the behavior for os.OpenFile
and os.NewFile without intending to affect net.Conn.File.Fd.
Use a hidden os entry point to preserve the historical behavior,
to ensure backward compatibility.

Change-Id: I8d14b9296070ddd52bb8940cb88c6a8b2dc28c27
Reviewed-on: https://go-review.googlesource.com/c/go/+/496080
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
src/net/fd_unix.go
src/net/file_unix_test.go [new file with mode: 0644]
src/os/file_unix.go