go/src/internal
Nick Patavalis ea5825b0b6 os: use poller when NewFile is called with a blocking descriptor.
If NewFile is called with a file descriptor that is already set to
non-blocking mode, it tries to return a pollable file (one for which
SetDeadline methods work) by adding the filedes to the poll/netpoll
mechanism. If called with a filedes in blocking mode, it returns a
non-pollable file, as it always did.

Fixes #22939
Updates #24331

Change-Id: Id54c8be1b83e6d35e14e76d7df0e57a9fd64e176
Reviewed-on: https://go-review.googlesource.com/100077
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-04-11 17:39:11 +00:00
..
bytealg internal/bytealg: add optimized Compare for arm64 2018-04-11 14:54:59 +00:00
cpu internal/cpu: align capability definitions for x86 with other architectures 2018-04-10 16:23:44 +00:00
nettrace net, net/http: don't trace DNS dials 2016-05-14 00:14:25 +00:00
poll internal/poll: if poller init fails, assume blocking mode 2018-03-06 23:21:25 +00:00
race testing: mark tests and benchmarks failed if a race occurs during execution 2016-11-03 18:19:49 +00:00
singleflight net: don't let cancelation of a DNS lookup affect another lookup 2018-03-16 13:39:38 +00:00
syscall os: use poller when NewFile is called with a blocking descriptor. 2018-04-11 17:39:11 +00:00
testenv all: drop support for Windows Vista or below (Windows XP) 2018-02-15 17:24:42 +00:00
testlog cmd/go: invalidate cached test results if env vars or files change 2017-12-11 19:08:32 +00:00
trace internal/trace: fix double counting in span analysis 2018-03-28 20:18:41 +00:00