refactor: Remove calls to StartShutdown from KernelNotifications

Use SignalInterrupt object instead. There is a slight change in behavior here
because the previous StartShutdown code used to abort on failure and the
new code logs errors instead.
This commit is contained in:
Ryan Ofsky
2023-07-07 17:32:54 -04:00
parent 6824eecaf1
commit feeb7b816a
9 changed files with 29 additions and 17 deletions

View File

@@ -10,8 +10,12 @@
#include <atomic>
#include <string>
namespace util {
class SignalInterrupt;
} // namespace util
namespace node {
void AbortNode(std::atomic<int>& exit_status, const std::string& debug_message, const bilingual_str& user_message = {}, bool shutdown = true);
void AbortNode(util::SignalInterrupt* shutdown, std::atomic<int>& exit_status, const std::string& debug_message, const bilingual_str& user_message = {});
} // namespace node
#endif // BITCOIN_NODE_ABORT_H