aboutsummaryrefslogtreecommitdiff
path: root/src/simplewallet/simplewallet.cpp
diff options
context:
space:
mode:
authorJethro Grassie <jtg@xtrabass.com>2018-02-01 15:32:30 -0500
committerJethro Grassie <jtg@xtrabass.com>2018-02-10 18:29:49 -0500
commita4b50a6f511e60a57955dab7586aba08a5c54337 (patch)
tree93a0915795456aae2eab1984d07929e8c4c12cd3 /src/simplewallet/simplewallet.cpp
parentMerge pull request #3198 (diff)
downloadmonero-a4b50a6f511e60a57955dab7586aba08a5c54337.tar.xz
handle ^D and ^C while password prompting
Diffstat (limited to 'src/simplewallet/simplewallet.cpp')
-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 a6cef1bb9..ea9212ff1 100644
--- a/src/simplewallet/simplewallet.cpp
+++ b/src/simplewallet/simplewallet.cpp
@@ -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