[Lldb-commits] [PATCH] D58230: [lldb] [MainLoop] Add kevent() EINTR handling
Kamil Rytarowski via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Feb 14 15:07:30 PST 2019
krytarowski added a comment.
In D58230#1398529 <https://reviews.llvm.org/D58230#1398529>, @mgorny wrote:
> In D58230#1398020 <https://reviews.llvm.org/D58230#1398020>, @krytarowski wrote:
>
> > For EINTR we shall use `llvm::sys::RetryAfterSignal`
>
>
> `kevent()` man page indicates:
>
> > All changes contained in the changelist are applied before any pending events are read from the queue.
>
> Also:
>
> > [EINTR] A signal was delivered before the timeout expired and before any events were placed on the kqueue for return.
>
> So while it's not stated explicitly, I think `in_events` is always consumed, even if EINTR is returned. In which case, `llvm::sys::RetryAfterSignal` would be wrong whenever `in_events` is not empty.
Please bring it to tech-kern@ to clear this and improve documentation. I think that we need to use `llvm::sys::RetryAfterSignal`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58230/new/
https://reviews.llvm.org/D58230
More information about the lldb-commits
mailing list