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 | ||||
try { | |||||
if (!fs::remove(GetPidFile(*node.args))) { | |||||
LogPrintf("%s: Unable to remove PID file: File does not exist\n", | |||||
__func__); | |||||
} | |||||
} catch (const fs::filesystem_error &e) { | |||||
LogPrintf("%s: Unable to remove PID file: %s\n", __func__, | |||||
fsbridge::get_filesystem_error_message(e)); | |||||
} | |||||
node.chain_clients.clear(); | node.chain_clients.clear(); | ||||
UnregisterAllValidationInterfaces(); | UnregisterAllValidationInterfaces(); | ||||
GetMainSignals().UnregisterBackgroundSignalScheduler(); | GetMainSignals().UnregisterBackgroundSignalScheduler(); | ||||
globalVerifyHandle.reset(); | globalVerifyHandle.reset(); | ||||
ECC_Stop(); | ECC_Stop(); | ||||
node.args = nullptr; | node.args = nullptr; | ||||
node.mempool = nullptr; | node.mempool = nullptr; | ||||
node.chainman = nullptr; | node.chainman = nullptr; | ||||
node.scheduler.reset(); | node.scheduler.reset(); | ||||
try { | |||||
if (!fs::remove(GetPidFile(*node.args))) { | |||||
LogPrintf("%s: Unable to remove PID file: File does not exist\n", | |||||
__func__); | |||||
} | |||||
} catch (const fs::filesystem_error &e) { | |||||
LogPrintf("%s: Unable to remove PID file: %s\n", __func__, | |||||
fsbridge::get_filesystem_error_message(e)); | |||||
} | |||||
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 |