diff options
author | gVisor bot <gvisor-bot@google.com> | 2019-07-30 18:09:41 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-07-30 18:09:41 +0000 |
commit | 3d4eebfac23658dcb2ae23de9f7ba2426383a111 (patch) | |
tree | 52ec95d2319e5897e7beb2a7738e02cdb9601fdd /pkg/fdnotifier | |
parent | 30b95562998aa74463b9cd75b4945b5c6c882f95 (diff) | |
parent | 1decf764718f66097ce5bbfe2cd14a883a4ef713 (diff) |
Merge 1decf764 (automated)
Diffstat (limited to 'pkg/fdnotifier')
-rw-r--r-- | pkg/fdnotifier/poll_unsafe.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pkg/fdnotifier/poll_unsafe.go b/pkg/fdnotifier/poll_unsafe.go index ab8857b5e..4225b04dd 100644 --- a/pkg/fdnotifier/poll_unsafe.go +++ b/pkg/fdnotifier/poll_unsafe.go @@ -35,8 +35,14 @@ func NonBlockingPoll(fd int32, mask waiter.EventMask) waiter.EventMask { events: int16(mask.ToLinux()), } + ts := syscall.Timespec{ + Sec: 0, + Nsec: 0, + } + for { - n, _, err := syscall.RawSyscall(syscall.SYS_POLL, uintptr(unsafe.Pointer(&e)), 1, 0) + n, _, err := syscall.RawSyscall6(syscall.SYS_PPOLL, uintptr(unsafe.Pointer(&e)), 1, + uintptr(unsafe.Pointer(&ts)), 0, 0, 0) // Interrupted by signal, try again. if err == syscall.EINTR { continue |