[lldb] [MainLoop] Add kevent() EINTR handling
authorMichal Gorny <mgorny@gentoo.org>
Fri, 15 Feb 2019 12:13:02 +0000 (12:13 +0000)
committerMichal Gorny <mgorny@gentoo.org>
Fri, 15 Feb 2019 12:13:02 +0000 (12:13 +0000)
commit53eabaab3f59ca9b32a3775f1cb7bf51717fa354
tree465d9e0df9f7edda4d39e46c7322a74c6fc4d62b
parent2c4730ded83a4cb4abe01781af415c4667569666
[lldb] [MainLoop] Add kevent() EINTR handling

Add missing EINTR handling for kevent() calls.  If the call is
interrupted, return from Poll() as if zero events were returned and let
the polling resume on next iteration.  This fixes test flakiness
on NetBSD.

Includes a test case suggested by Pavel Labath on D42206.

Differential Revision: https://reviews.llvm.org/D58230

llvm-svn: 354122
lldb/source/Host/common/MainLoop.cpp
lldb/unittests/Host/MainLoopTest.cpp