wasix: read IPC streams with plain read() instead of failing ENOSYS#8
Open
Arshia001 wants to merge 1 commit into
Open
wasix: read IPC streams with plain read() instead of failing ENOSYS#8Arshia001 wants to merge 1 commit into
Arshia001 wants to merge 1 commit into
Conversation
The IPC branch of uv__stream_io was stubbed to fail ENOSYS under __wasi__ (no msghdr support), which killed every Node child_process.fork / cluster.fork IPC channel on first readiness: the stream errored, libuv closed the fd, and subsequent sends failed EPIPE. No descriptor can accompany IPC data on WASIX anyway - uv__try_write already refuses send_handle with UV_ENOSYS on both ends - so a plain read() preserves the IPC byte stream exactly. This makes fork/process.send message channels fully functional under WASIX; passing handles (cluster round-robin connection distribution) remains unsupported. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
The IPC branch of
uv__stream_iowas stubbed to failENOSYSunder__wasi__(no msghdr support), which killed every Nodechild_process.fork/cluster.forkIPC channel on first readiness: the stream errored, libuv closed the fd, and subsequent sends failedEPIPE.No descriptor can accompany IPC data on WASIX anyway —
uv__try_writealready refusessend_handlewithUV_ENOSYSon both ends — so a plainread()preserves the IPC byte stream exactly. Verified end-to-end with EdgeJS on wasmer 7.2.0-rc.1: fork ping/pong roundtrip, cluster worker online handshake, and cluster listen negotiation all work; handle passing (round-robin connection distribution) remains unsupported as before.🤖 Generated with Claude Code