rwcancel: use unix.Poll again but bump x/sys so it uses ppoll under the hood

This reverts commit fcc601dbf0 but then
bumps go.mod.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld
2021-09-27 14:18:38 -06:00
parent fcc601dbf0
commit bb745b2ea3
5 changed files with 14 additions and 54 deletions

View File

@@ -49,7 +49,7 @@ func (rw *RWCancel) ReadyRead() bool {
pollFds := []unix.PollFd{{Fd: int32(rw.fd), Events: unix.POLLIN}, {Fd: closeFd, Events: unix.POLLIN}}
var err error
for {
_, err = poll(pollFds, -1)
_, err = unix.Poll(pollFds, -1)
if err == nil || !RetryAfterError(err) {
break
}
@@ -68,7 +68,7 @@ func (rw *RWCancel) ReadyWrite() bool {
pollFds := []unix.PollFd{{Fd: int32(rw.fd), Events: unix.POLLOUT}, {Fd: closeFd, Events: unix.POLLOUT}}
var err error
for {
_, err = poll(pollFds, -1)
_, err = unix.Poll(pollFds, -1)
if err == nil || !RetryAfterError(err) {
break
}