]> Cypherpunks repositories - gostls13.git/commit
os: don't let sendFile put a pipe into blocking mode
authorIan Lance Taylor <iant@golang.org>
Thu, 20 Dec 2018 00:47:50 +0000 (16:47 -0800)
committerIan Lance Taylor <iant@golang.org>
Fri, 28 Dec 2018 04:17:55 +0000 (04:17 +0000)
commitc043fc4f655ce34f67a0e7fe2833139f6313a3f0
tree3c6e5c1f13a1afc4ed079ea92c65491e13c5e7b8
parentb115207baf6c2decc3820ada4574ef4e5ad940ec
os: don't let sendFile put a pipe into blocking mode

Use SyscallConn to avoid calling the Fd method in sendFile on Unix
systems, since Fd has the side effect of putting the descriptor into
blocking mode.

Fixes #28330

Change-Id: If093417a225fe44092bd2c0dbbc3937422e98c0b
Reviewed-on: https://go-review.googlesource.com/c/155137
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/net/sendfile_linux.go
src/net/sendfile_test.go
src/net/sendfile_unix_alt.go