mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-22 23:55: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);
|
std::getline(std::cin, line);
|
||||||
|
|
||||||
// No content; end of stdin.
|
// No content; end of stdin.
|
||||||
if (line.empty())
|
if (line.empty()) {
|
||||||
return nullptr;
|
std::cerr << "stdin closed; exiting" << std::endl;
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
// std::cin >> line;
|
// std::cin >> line;
|
||||||
// std::cerr << "Read line " << line;
|
// std::cerr << "Read line " << line;
|
||||||
|
Loading…
Reference in New Issue
Block a user