Restore terminal state on termination

This commit is contained in:
2025-07-24 18:35:04 +02:00
parent a5eb5532d5
commit 9f6cfc17f8
3 changed files with 16 additions and 3 deletions

View File

@ -198,8 +198,9 @@ void reHDD::ThreadUserInput()
ui->updateTUI(&listDrives, u8SelectedEntry);
break;
case TUI::UserInput::Terminate:
cout << "Terminate" << endl;
// cout << "Terminate" << endl;
stopShredAllDrives(&listDrives);
ui->terminateTUI();
sleep(5); // sleep 5 sec
std::exit(1); // Terminates main, doesn't wait for threads
break;
@ -724,4 +725,4 @@ bool reHDD::getSystemDrive(string &systemDrive)
pclose(outputfileHwinfo);
return systemDriveFound;
}
}