Changeset View
Changeset View
Standalone View
Standalone View
src/init.cpp
Show First 20 Lines • Show All 300 Lines • ▼ Show 20 Lines | |||||
#if ENABLE_ZMQ | #if ENABLE_ZMQ | ||||
if (g_zmq_notification_interface) { | if (g_zmq_notification_interface) { | ||||
UnregisterValidationInterface(g_zmq_notification_interface); | UnregisterValidationInterface(g_zmq_notification_interface); | ||||
delete g_zmq_notification_interface; | delete g_zmq_notification_interface; | ||||
g_zmq_notification_interface = nullptr; | g_zmq_notification_interface = nullptr; | ||||
} | } | ||||
#endif | #endif | ||||
node.chain_clients.clear(); | |||||
UnregisterAllValidationInterfaces(); | |||||
GetMainSignals().UnregisterBackgroundSignalScheduler(); | |||||
globalVerifyHandle.reset(); | |||||
ECC_Stop(); | |||||
node.mempool = nullptr; | |||||
node.chainman = nullptr; | |||||
node.scheduler.reset(); | |||||
try { | try { | ||||
if (!fs::remove(GetPidFile(*node.args))) { | if (!fs::remove(GetPidFile(*node.args))) { | ||||
LogPrintf("%s: Unable to remove PID file: File does not exist\n", | LogPrintf("%s: Unable to remove PID file: File does not exist\n", | ||||
__func__); | __func__); | ||||
} | } | ||||
} catch (const fs::filesystem_error &e) { | } catch (const fs::filesystem_error &e) { | ||||
LogPrintf("%s: Unable to remove PID file: %s\n", __func__, | LogPrintf("%s: Unable to remove PID file: %s\n", __func__, | ||||
fsbridge::get_filesystem_error_message(e)); | fsbridge::get_filesystem_error_message(e)); | ||||
} | } | ||||
node.chain_clients.clear(); | |||||
UnregisterAllValidationInterfaces(); | |||||
GetMainSignals().UnregisterBackgroundSignalScheduler(); | |||||
globalVerifyHandle.reset(); | |||||
ECC_Stop(); | |||||
node.args = nullptr; | node.args = nullptr; | ||||
node.mempool = nullptr; | |||||
node.chainman = nullptr; | |||||
node.scheduler.reset(); | |||||
LogPrintf("%s: done\n", __func__); | LogPrintf("%s: done\n", __func__); | ||||
} | } | ||||
/** | /** | ||||
* Signal handlers are very limited in what they are allowed to do. | * Signal handlers are very limited in what they are allowed to do. | ||||
* The execution context the handler is invoked in is not guaranteed, | * The execution context the handler is invoked in is not guaranteed, | ||||
* so we restrict handler operations to just touching variables: | * so we restrict handler operations to just touching variables: | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 2,620 Lines • Show Last 20 Lines |