[PATCH] D47643: Rewrite JSON dispatcher loop using C IO (FILE*) instead of std::istream.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 4 00:57:02 PDT 2018


sammccall added a comment.

In https://reviews.llvm.org/D47643#1120385, @malaperle wrote:

> In https://reviews.llvm.org/D47643#1119187, @sammccall wrote:
>
> > @malaperle: would you mind patching this in and checking whether attaching a debugger still works on Mac (this was the reason for the EINTR loop, right?)
> >
> > I want to preserve this but now people other than me are complaining about old clangds hanging around and eating all their CPU :-)
>
>
> I tried the patch but as soon as I attach the debugger I get "IO error: Interrupted system call" from Clangd's stderr. I didn't get to look into this further.


Thanks! I managed to kind-of reproduce this (`kill -SIGSYS` produces the same behavior... in some cases) and it turns out I forgot to clear the error bit on the stream.
If you get a chance to try again it'd be much appreciated (or @ilya-biryukov, you have a mac laptop right?)


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D47643





More information about the cfe-commits mailing list