mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 20:03:34 -03:00
Remove PID file at the very end
This commit is contained in:
parent
c8971547d9
commit
7fcdec0f32
1 changed files with 9 additions and 7 deletions
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__);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue