mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
util: Add SignalInterrupt class and use in shutdown.cpp
This change helps generalize shutdown code so an interrupt can be provided to libbitcoinkernel callers. This may also be useful to eventually de-globalize all of the shutdown code. Co-authored-by: Russell Yanofsky <russ@yanofsky.org> Co-authored-by: TheCharlatan <seb.kung@gmail.com>
This commit is contained in:
parent
d9c7c2fd3e
commit
e2d680a32d
10 changed files with 175 additions and 65 deletions
|
|
@ -812,9 +812,7 @@ bool AppInitBasicSetup(const ArgsManager& args, std::atomic<int>& exit_status)
|
|||
// Enable heap terminate-on-corruption
|
||||
HeapSetInformation(nullptr, HeapEnableTerminationOnCorruption, nullptr, 0);
|
||||
#endif
|
||||
if (!InitShutdownState(exit_status)) {
|
||||
return InitError(Untranslated("Initializing wait-for-shutdown state failed."));
|
||||
}
|
||||
InitShutdownState(exit_status);
|
||||
|
||||
if (!SetupNetworking()) {
|
||||
return InitError(Untranslated("Initializing networking failed."));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue