Conversation
Sjors
force-pushed
the
2026/06/nonunix
branch
5 times, most recently
from
June 23, 2026 16:05
11ac490 to
14a8fe7
Compare
Pass exe_name parameter to ipc::Protocol class constructor instead. It never really made sense to have exe parameters as part of the protocol interface and removing them makes adding new features like Windows support easier. The exe name values are only used for logging and debugging purposes to distinguish log messages from different processes. This commit is based on 33d37f3c35efaac136863253b91799bf2711fd46 with the bitcoin/bitcoin changes to src/ipc/test/ipc_tests.cpp omitted. Co-authored-by: OpenAI Codex 5.6 Sol <noreply@openai.com>
This just changes Protocol class field order to make sure class members are not destroyed before the event loop thread exits. There is no change in behavior. The change is just being made to clarify intent and avoid potential bugs.
Keep standard headers separate from posix headers
Avoid compile error from MSVC: D:\a\bitcoin\bitcoin\src\ipc\interfaces.cpp(24,1): error C1083: Cannot open include file: 'unistd.h': No such file or directory MinGW provides this header but MSVC does not. Header is unneeded on windows because HandleCtrlC code that uses it is not compiled on windows.
Use ProcessId type instead of int to represent process ids to be compatible with an upcoming version of libmultiprocess which adds windows support.
Use SocketId type instead of int to represent socket ids to be compatible with an upcoming version of libmultiprocess which adds Windows support. This commit is based on 3859805f05e6fb642140c89e6d7378203e04df2c with the bitcoin/bitcoin changes to src/ipc/test/ipc_tests.cpp omitted. Co-authored-by: OpenAI Codex 5.6 Sol <noreply@openai.com>
Use Stream type to abstract socket ids and be compatible with updated mp::ConnectStream() and mp::ServeStream() functions that use streams instead of socket ids in an upcoming version of libmultiprocess which adds Windows support. Since creating Stream objects from socket ids can require the event loop to be running, the ipc::Protocol::serve() method is also updated to accept the server stream through a callback parameter instead of a normal parameter. This commit is based on e9f19815caa3e129020f116bef43d409cb50a475 with the bitcoin/bitcoin changes to src/ipc/test/ipc_tests.cpp omitted. Co-authored-by: OpenAI Codex 5.6 Sol <noreply@openai.com>
Use new SpawnProcess and StartSpawned functions to be compatible with an upcoming version of libmultiprocess which adds windows support.
Wrap socketpair descriptors with libmultiprocess streams before passing them to ConnectStream and ServeStream. This updates the sv2 test harness after cherry-picking the Bitcoin Core IPC stream refactor. Co-authored-by: OpenAI Codex 5.6 Sol <noreply@openai.com>
3f221b5bfd Merge bitcoin-core/libmultiprocess#274: Add nonunix platform support 1b0f605606 doc: Remove trailing whitespace d8f8ca3119 ipc: Wrap mpgen main() in try-catch to print errors fbe5a14ad4 ci: Check out bitcoin/bitcoin PR #35084 instead of master 39d3690d83 types: Replace SFINAE with requires clauses to avoid MSVC C2039 error ba68520203 proxy, refactor: Fix C4305 truncation warning in Accessor on MSVC 1d81d47811 util, refactor: Fix PtrOrValue constructor for move-only types on MSVC b883fe1e52 proxy: Fix shutdownWrite() exception handling on macOS with dynamic libraries 0012411ccc proxy: Call shutdownWrite() in Connection destructor 38312ad191 proxy, refactor: Change ConnectStream and ServeStream to accept stream objects e96d5d742a proxy, refactor: Replace EventLoop wakeup fd integers with KJ stream objects db4f9a3d73 cmake: Bump minimum required Cap'n Proto version to 0.9 652934fb79 util, refactor: Add SocketPair() and use it in SpawnProcess 1c6ef7a26c util, refactor: Do not fork() and exec() separately 1389cf3132 util, refactor: Add SpawnConnectInfo type alias and use it c7ca1f00b6 util, refactor: Add SocketId type alias and use it be46a35203 util, refactor: Add ProcessId type alias and use it 91a78db780 doc: Bump version 13 > 14 git-subtree-dir: src/ipc/libmultiprocess git-subtree-split: 3f221b5bfd7ee0e7972e3c5ed4bb7ee86e457f6d
The embedded libmultiprocess subtree now provides the v14 ProcessId, SocketId, Stream, and process spawning APIs directly. Co-authored-by: OpenAI Codex 5.6 Sol <noreply@openai.com>
Collaborator
Author
|
Rebased after #113. The subtree update here is now from v13 to v14, in order to pull in bitcoin-core/libmultiprocess#274. Just waiting for the Bitcoin Core PR to be merged, in order to minimize drift with our implementation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This tracks:
The subtree update is not strictly needed in this PR, because of the shims, but I prefer to it over with. Shims are dropped in the last commit.