mirror of
https://github.com/intel/llvm.git
synced 2026-01-20 01:58:44 +08:00
Clear read_fd_set if EINTR received
Leaving bits uncleared set causes callbacks to be triggered even though there are no events to process. Starting with D131160 we have a callback that makes blocking read calls over pipe which was causing the lldb-server main loop to become unresponsive / blocked on Android. Reviewed By: labath Differential Revision: https://reviews.llvm.org/D144240
This commit is contained in:
committed by
Pavel Labath
parent
52786141f9
commit
d8bd179a17
@@ -156,9 +156,12 @@ Status MainLoopPosix::RunImpl::Poll() {
|
||||
size_t sigset_len;
|
||||
} extra_data = {&kernel_sigset, sizeof(kernel_sigset)};
|
||||
if (syscall(__NR_pselect6, nfds, &read_fd_set, nullptr, nullptr, nullptr,
|
||||
&extra_data) == -1 &&
|
||||
errno != EINTR)
|
||||
return Status(errno, eErrorTypePOSIX);
|
||||
&extra_data) == -1) {
|
||||
if (errno != EINTR)
|
||||
return Status(errno, eErrorTypePOSIX);
|
||||
else
|
||||
FD_ZERO(&read_fd_set);
|
||||
}
|
||||
|
||||
return Status();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user