Index: source/Host/common/MainLoop.cpp =================================================================== --- source/Host/common/MainLoop.cpp +++ source/Host/common/MainLoop.cpp @@ -105,8 +105,11 @@ for (auto &fd : loop.m_read_fds) EV_SET(&in_events[i++], fd.first, EVFILT_READ, EV_ADD, 0, 0, 0); - num_events = kevent(loop.m_kqueue, in_events.data(), in_events.size(), - out_events, llvm::array_lengthof(out_events), nullptr); + do { + errno = 0; + num_events = kevent(loop.m_kqueue, in_events.data(), in_events.size(), + out_events, llvm::array_lengthof(out_events), nullptr); + } while (num_events == -1 && errno == EINTR); if (num_events < 0) return Status("kevent() failed with error %d\n", num_events);