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);
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);
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits