[PATCH] D30675: [clangd] Fix not being able to attach a debugger on macOS

Phabricator via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 14 13:53:39 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL297779: [clangd] Fix not being able to attach a debugger on macOS (authored by d0k).

Changed prior to commit:
  https://reviews.llvm.org/D30675?vs=91246&id=91768#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D30675

Files:
  clang-tools-extra/trunk/clangd/ClangDMain.cpp


Index: clang-tools-extra/trunk/clangd/ClangDMain.cpp
===================================================================
--- clang-tools-extra/trunk/clangd/ClangDMain.cpp
+++ clang-tools-extra/trunk/clangd/ClangDMain.cpp
@@ -67,6 +67,10 @@
     // by \r\n.
     std::string Line;
     std::getline(std::cin, Line);
+    if (!std::cin.good() && errno == EINTR) {
+      std::cin.clear();
+      continue;
+    }
 
     // Skip empty lines.
     llvm::StringRef LineRef(Line);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30675.91768.patch
Type: text/x-patch
Size: 475 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170314/fa229a36/attachment.bin>


More information about the cfe-commits mailing list