From 35b84ae7e73b9aa84b73b1ef4fac326a3d014425 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Tue, 28 Jul 2015 15:16:27 +0200 Subject: [PATCH] Use atomic for g_silence. Fixed #2285. --- eth/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eth/main.cpp b/eth/main.cpp index 4d3707c10..9a6169b67 100644 --- a/eth/main.cpp +++ b/eth/main.cpp @@ -66,7 +66,7 @@ using namespace dev::eth; using namespace boost::algorithm; using dev::eth::Instruction; -static bool g_silence = false; +static std::atomic g_silence = {false}; void interactiveHelp() { @@ -1560,7 +1560,7 @@ int main(int argc, char** argv) }; auto getPassword = [&](string const& prompt){ - auto s = g_silence; + bool s = g_silence; g_silence = true; cout << endl; string ret = dev::getPassword(prompt);