]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.20] 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>
Tue, 23 May 2023 00:35:33 +0000 (00:35 +0000)
commit31a1e19a5981f63485ce5c56b0e783d1af278514
tree558bec9fc480681d1542ef1dbe0290934c0cff65
parent450c8021a5a55dd42fb29fa66fe0546d1be8bc60
[release-branch.go1.20] 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.

For #58408
For #60211
For #60217

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>
(cherry picked from commit b950cc8f11dc31cc9f6cfbed883818a7aa3abe94)
Reviewed-on: https://go-review.googlesource.com/c/go/+/496715
src/net/fd_unix.go
src/net/file_unix_test.go [new file with mode: 0644]
src/os/file_unix.go