aboutsummaryrefslogtreecommitdiff
path: root/src/simplewallet
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2018-02-17 21:48:30 +0100
committerRiccardo Spagni <ric@spagni.net>2018-02-17 21:48:30 +0100
commit5a8e7fd0e5efe622aff6e5326072df767cea7ee3 (patch)
treec6726b5307c445d99954c82e1c35f899bf197301 /src/simplewallet
parentMerge pull request #3274 (diff)
parenthandle ^D and ^C while password prompting (diff)
downloadmonero-5a8e7fd0e5efe622aff6e5326072df767cea7ee3.tar.xz
Merge pull request #3249
a4b50a6f handle ^D and ^C while password prompting (Jethro Grassie)
Diffstat (limited to 'src/simplewallet')
-rw-r--r--src/simplewallet/simplewallet.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp
index 2d8eb97e0..150c6333c 100644
--- a/src/simplewallet/simplewallet.cpp
+++ b/src/simplewallet/simplewallet.cpp
@@ -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