Exit when there is no more stdin input

This commit is contained in:
Jacob Dufault 2017-05-18 18:13:51 -07:00
parent 2b407e0bce
commit 866faed4fc

View File

@ -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;