CLIConsole: On 'exit', ask whether to quit attached instance
Tá an tiomantas seo le fáil i:
tuismitheoir
0bdb22c170
tiomantas
d5485a833f
@ -104,7 +104,17 @@ void CLIConsole::startInteractive()
|
||||
auto pair = CLIHandler::splitCommand(input);
|
||||
if(pair.first == "exit")
|
||||
{
|
||||
std::cout << "Exiting CLI";
|
||||
if(attached)
|
||||
{
|
||||
std::cout << "You are attached. Quit attached instance too (y) or only this one(n)" << std::endl;
|
||||
char response;
|
||||
std::cin >> response;
|
||||
if(response == 'y')
|
||||
{
|
||||
this->send("exit");
|
||||
}
|
||||
}
|
||||
std::cout << "Exiting CLI" << std::endl;
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
if(pair.first == "attach")
|
||||
|
Á lódáil...
x
Tagairt in Eagrán Nua
Cuir bac ar úsáideoir