]> Cypherpunks repositories - gostls13.git/commit
os: use poller when NewFile is called with a blocking descriptor.
authorNick Patavalis <nick.patavalis@gmail.com>
Sun, 11 Mar 2018 17:11:33 +0000 (19:11 +0200)
committerIan Lance Taylor <iant@golang.org>
Wed, 11 Apr 2018 17:39:11 +0000 (17:39 +0000)
commitea5825b0b64e1a017a76eac0ad734e11ff557c8e
treed8e49068c0a2e6bffa3b4068360cfdb089560235
parentab48574bab55eec033c4fed7f7eb4cedfaef90aa
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>
src/go/build/deps_test.go
src/internal/syscall/unix/empty.s [new file with mode: 0644]
src/internal/syscall/unix/nonblocking.go [new file with mode: 0644]
src/internal/syscall/unix/nonblocking_nacl.go [new file with mode: 0644]
src/os/exec/exec_test.go
src/os/file_unix.go
src/os/os_unix_test.go