While reproducing the bug from #18517, I've noticed that the bitcoind.pid file has already been removed when the bitcoind hangs.
This PR makes Shutdown() keep the bitcoind.pid file available until the end.
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
285 | @@ -293,6 +286,14 @@ void Shutdown(NodeContext& node)
286 | if (node.mempool) node.mempool = nullptr;
287 | node.scheduler.reset();
288 | LogPrintf("%s: done\n", __func__);
I would put line 288 at the very end. Done should always be the last message in a log. Otherwise it would be weird if stuff still follows
Concept ACK with exception to move the done LogPrintf
Updated b2486a3493516745a452b5b87e44289dfb55fed3 -> 7fcdec0f326f7fb547ec9c651871842cf518ea38 (pr18526.01 -> pr18526.02, diff):
I would put line 288 at the very end. Done should always be the last message in a log. Otherwise it would be weird if stuff still follows
utACK 7fcdec0f326f7fb547ec9c651871842cf518ea38
ACK 7fcdec0f326f7fb547ec9c651871842cf518ea38
Code review ACK 7fcdec0f326f7fb547ec9c651871842cf518ea38.
Code review ACK 7fcdec0f326f7fb547ec9c651871842cf518ea38