mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-29 02:11:24 +02:00
Remove PID file at the very end
This commit is contained in:
16
src/init.cpp
16
src/init.cpp
@ -278,13 +278,6 @@ void Shutdown(NodeContext& node)
|
||||
}
|
||||
#endif
|
||||
|
||||
try {
|
||||
if (!fs::remove(GetPidFile())) {
|
||||
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();
|
||||
UnregisterAllValidationInterfaces();
|
||||
GetMainSignals().UnregisterBackgroundSignalScheduler();
|
||||
@ -292,6 +285,15 @@ void Shutdown(NodeContext& node)
|
||||
ECC_Stop();
|
||||
if (node.mempool) node.mempool = nullptr;
|
||||
node.scheduler.reset();
|
||||
|
||||
try {
|
||||
if (!fs::remove(GetPidFile())) {
|
||||
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__);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user