Merge pull request #3249

a4b50a6f handle ^D and ^C while password prompting (Jethro Grassie)
This commit is contained in:
Riccardo Spagni 2018-02-17 21:48:30 +01:00
commit 5a8e7fd0e5
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD
4 changed files with 24 additions and 6 deletions

View file

@ -639,6 +639,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
{
@ -6811,6 +6813,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