diff options
author | Jethro Grassie <jtg@xtrabass.com> | 2018-02-01 15:32:30 -0500 |
---|---|---|
committer | Jethro Grassie <jtg@xtrabass.com> | 2018-02-10 18:29:49 -0500 |
commit | a4b50a6f511e60a57955dab7586aba08a5c54337 (patch) | |
tree | 93a0915795456aae2eab1984d07929e8c4c12cd3 /src/common/password.h | |
parent | Merge pull request #3198 (diff) | |
download | monero-a4b50a6f511e60a57955dab7586aba08a5c54337.tar.xz |
handle ^D and ^C while password prompting
Diffstat (limited to 'src/common/password.h')
-rw-r--r-- | src/common/password.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/password.h b/src/common/password.h index 7c29effe4..61937b93a 100644 --- a/src/common/password.h +++ b/src/common/password.h @@ -31,6 +31,7 @@ #pragma once #include <string> +#include <atomic> #include <boost/optional/optional.hpp> #include "wipeable_string.h" @@ -49,6 +50,7 @@ namespace tools //! \return A password from stdin TTY prompt or `std::cin` pipe. static boost::optional<password_container> prompt(bool verify, const char *mesage = "Password"); + static std::atomic<bool> is_prompting; password_container(const password_container&) = delete; password_container(password_container&& rhs) = default; |