]> Cypherpunks repositories - gostls13.git/commit
internal/poll: don't wait for unpollable files
authorIan Lance Taylor <iant@golang.org>
Thu, 13 Jul 2017 22:07:07 +0000 (15:07 -0700)
committerIan Lance Taylor <iant@golang.org>
Fri, 14 Jul 2017 04:03:31 +0000 (04:03 +0000)
commit26f0a7af456b3743e718002534576c6ef1ad99a3
treede706c3cad0b857667f3b573795c3ce9d71846e4
parent4c98ecbf05d1baba49607a6e168a408787cf77d6
internal/poll: don't wait for unpollable files

If we get an EAGAIN error on an unpollable file, don't try to wait for
it to be ready; just return EAGAIN.

It's possible that we should instead ensure that when Stdin is a pipe
in non-blocking mode, we wait for data to appear. For now take the
conservative approach of doing what we did in previous releases.

Based on https://golang.org/cl/47555 by Totoro W.

Fixes #20915

Change-Id: Icc9e97a5a877b0a3583ec056c35412d1afab62d1
Reviewed-on: https://go-review.googlesource.com/48490
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/internal/poll/fd_poll_nacl.go
src/internal/poll/fd_poll_runtime.go
src/internal/poll/fd_unix.go
src/os/pipe_test.go