diff --git a/src/ripple/app/main/Application.cpp b/src/ripple/app/main/Application.cpp index d417c52443..75f7681859 100644 --- a/src/ripple/app/main/Application.cpp +++ b/src/ripple/app/main/Application.cpp @@ -414,7 +414,7 @@ public: , m_entropyTimer (this) - , m_signals(get_io_service(), SIGINT) + , m_signals (get_io_service()) , m_resolver (ResolverAsio::New (get_io_service(), m_logs.journal("Resolver"))) @@ -677,9 +677,11 @@ public: // VFALCO NOTE: 0 means use heuristics to determine the thread count. m_jobQueue->setThreadCount (0, getConfig ().RUN_STANDALONE); + // We want to intercept and wait for CTRL-C to terminate the process + m_signals.add (SIGINT); + m_signals.async_wait(std::bind(&ApplicationImp::signalled, this, - std::placeholders::_1, - std::placeholders::_2)); + std::placeholders::_1, std::placeholders::_2)); assert (mTxnDB == nullptr); @@ -1403,7 +1405,7 @@ static void addTxnSeqField () Blob txnMeta; soci::statement st = - (session.prepare << + (session.prepare << "SELECT TransID, TxnMeta FROM Transactions;", soci::into(strTransId), soci::into(sociTxnMetaBlob, tmi));