From c96e529e3b6d0efa504985bf5a6db1ac5e958fdf Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Mon, 25 Feb 2019 19:07:48 +0000 Subject: Vendor import of lldb release_80 branch r354799: https://llvm.org/svn/llvm-project/lldb/branches/release_80@354799 --- source/Host/common/MainLoop.cpp | 10 ++++++++-- source/Host/openbsd/Host.cpp | 3 +-- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'source') 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(); } diff --git a/source/Host/openbsd/Host.cpp b/source/Host/openbsd/Host.cpp index cba1f4ee6b7c..8db0498d14b5 100644 --- a/source/Host/openbsd/Host.cpp +++ b/source/Host/openbsd/Host.cpp @@ -68,8 +68,7 @@ GetOpenBSDProcessArgs(const ProcessInstanceInfoMatch *match_info_ptr, cstr = data.GetCStr(&offset); if (cstr) { - process_info.GetExecutableFile().SetFile(cstr, false, - FileSpec::Style::native); + process_info.GetExecutableFile().SetFile(cstr, FileSpec::Style::native); if (!(match_info_ptr == NULL || NameMatches( -- cgit v1.3