mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-22 07:35:08 +00:00
Exit when there is no more stdin input
This commit is contained in:
parent
2b407e0bce
commit
866faed4fc
@ -35,8 +35,10 @@ std::unique_ptr<BaseIpcMessage> MessageRegistry::ReadMessageFromStdin() {
|
||||
std::getline(std::cin, line);
|
||||
|
||||
// No content; end of stdin.
|
||||
if (line.empty())
|
||||
return nullptr;
|
||||
if (line.empty()) {
|
||||
std::cerr << "stdin closed; exiting" << std::endl;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
// std::cin >> line;
|
||||
// std::cerr << "Read line " << line;
|
||||
|
Loading…
Reference in New Issue
Block a user