aboutsummaryrefslogtreecommitdiffstats
path: root/source/Host/common/MainLoop.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-02-25 19:07:48 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-02-25 19:07:48 +0000
commitc96e529e3b6d0efa504985bf5a6db1ac5e958fdf (patch)
tree916b8e5827dd34e57b7f0dfc8006480ecfb2f430 /source/Host/common/MainLoop.cpp
parent012155a8760772089d507063b47b7f4c911a782b (diff)
downloadsrc-vendor/lldb/lldb-release_80-r355313.tar.gz
src-vendor/lldb/lldb-release_80-r355313.zip
Diffstat (limited to 'source/Host/common/MainLoop.cpp')
-rw-r--r--source/Host/common/MainLoop.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/Host/common/MainLoop.cpp b/source/Host/common/MainLoop.cpp
index 39c353e6717e..337ddd51dd6b 100644
--- a/source/Host/common/MainLoop.cpp
+++ b/source/Host/common/MainLoop.cpp
@@ -108,8 +108,14 @@ Status MainLoop::RunImpl::Poll() {
num_events = kevent(loop.m_kqueue, in_events.data(), in_events.size(),
out_events, llvm::array_lengthof(out_events), nullptr);
- if (num_events < 0)
- return Status("kevent() failed with error %d\n", num_events);
+ if (num_events < 0) {
+ if (errno == EINTR) {
+ // in case of EINTR, let the main loop run one iteration
+ // we need to zero num_events to avoid assertions failing
+ num_events = 0;
+ } else
+ return Status(errno, eErrorTypePOSIX);
+ }
return Status();
}