| 74 | |
| 75 | |
| 76 | void cRoot::InputThread(void * a_Params) |
| 77 | { |
| 78 | cRoot & self = *(cRoot*)a_Params; |
| 79 | |
| 80 | cLogCommandOutputCallback Output; |
| 81 | |
| 82 | while (!self.m_bStop && !self.m_bRestart && !g_TERMINATE_EVENT_RAISED && std::cin.good()) |
| 83 | { |
| 84 | AString Command; |
| 85 | std::getline(std::cin, Command); |
| 86 | if (!Command.empty()) |
| 87 | { |
| 88 | self.ExecuteConsoleCommand(TrimString(Command), Output); |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | if (g_TERMINATE_EVENT_RAISED || !std::cin.good()) |
| 93 | { |
| 94 | // We have come here because the std::cin has received an EOF / a terminate signal has been sent, and the server is still running; stop the server: |
| 95 | self.m_bStop = true; |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | |
| 100 |
nothing calls this directly
no test coverage detected