mirror of
https://github.com/monero-project/monero.git
synced 2025-08-19 02:17:53 -04:00
handle ^D and ^C while password prompting
This commit is contained in:
parent
ed67e5c001
commit
a4b50a6f51
4 changed files with 24 additions and 6 deletions
|
@ -638,6 +638,8 @@ bool simple_wallet::change_password(const std::vector<std::string> &args)
|
|||
|
||||
// prompts for a new password, pass true to verify the password
|
||||
const auto pwd_container = default_password_prompter(true);
|
||||
if(!pwd_container)
|
||||
return true;
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -6806,6 +6808,11 @@ int main(int argc, char* argv[])
|
|||
else
|
||||
{
|
||||
tools::signal_handler::install([&w](int type) {
|
||||
if (tools::password_container::is_prompting.load())
|
||||
{
|
||||
// must be prompting for password so return and let the signal stop prompt
|
||||
return;
|
||||
}
|
||||
#ifdef WIN32
|
||||
if (type == CTRL_C_EVENT)
|
||||
#else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue