CLIConsole: On 'exit', ask whether to quit attached instance

This commit is contained in:
Albert S. 2021-10-10 12:17:29 +02:00
부모 0bdb22c170
커밋 d5485a833f
1개의 변경된 파일11개의 추가작업 그리고 1개의 파일을 삭제

파일 보기

@ -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")