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
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:
f8fd3959d51f
ipc: Use EventLoopRef instead of addClient/removeClient637502894db3
test: Add unit test coverage for Init and Shutdown codeff1c9278e7ae
ipc: Avoid waiting for clients to disconnect when shutting downd37b740047cd
doc: Improve IPC interface comments008f4ae01ebb
ipc: Add Ctrl-C handler for spawned subprocesses0a9a1940782f
ipc: 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.