This PR fixes various problems when IPC connections are broken or hang which were reported in https://github.com/bitcoin-core/libmultiprocess/issues/123, https://github.com/bitcoin-core/libmultiprocess/issues/176, and https://github.com/bitcoin-core/libmultiprocess/pull/182. The different fixes are described in commit messages.
The first two commits of this PR update the libmultiprocess subtree including the following PRs:
- https://github.com/bitcoin-core/libmultiprocess/pull/181
- https://github.com/bitcoin-core/libmultiprocess/pull/179
- https://github.com/bitcoin-core/libmultiprocess/pull/160
- https://github.com/bitcoin-core/libmultiprocess/pull/184
- https://github.com/bitcoin-core/libmultiprocess/pull/187
- https://github.com/bitcoin-core/libmultiprocess/pull/186
- https://github.com/bitcoin-core/libmultiprocess/pull/192
The subtree changes can be verified by running test/lint/git-subtree-check.sh src/ipc/libmultiprocess as described in developer notes and lint instructions.
The remaining commits are:
- 9a9fb19536faipc: Use EventLoopRef instead of addClient/removeClient
- 6eb09fd6141ftest: Add unit test coverage for Init and Shutdown code
- 7f65aac78b95ipc: Avoid waiting for clients to disconnect when shutting down
- 0c28068ceb7bdoc: Improve IPC interface comments
- 216099591632ipc: Add Ctrl-C handler for spawned subprocesses
- 2581258ec200ipc: Handle bitcoin-wallet disconnections
The new commits depend on the subtree update, and because the subtree update includes an incompatible API change, the “Use EventLoopRef” commit needs to be part of the same PR to avoid breaking the build. The other commits also make sense to merge at the same time because the bitcoin & libmultiprocess changes were written and tested together.
This PR is part of the process separation project.