-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(node): Rework node:child_process IPC #24763
Merged
Merged
Changes from 40 commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
ab62f0e
Skip conditions arg in fork
nathanwhit 4818ecf
Only serialize once for ipc_write
nathanwhit 28fb48c
Rework ipc serialization
nathanwhit 057aeec
Add unit test for ipc serialization
nathanwhit f548aa1
Use memchr crate instead of handrolling
nathanwhit 94a97de
Don't use null as sentinel for closing ipc
nathanwhit 7957505
Fix test
nathanwhit 4ffc92a
Fix inability to exit due to unresolved async op
nathanwhit f7d1739
Fix test
nathanwhit 24e91ea
Don't throw if you call kill multiple times
nathanwhit fab2dad
Do buffering ourselves to avoid UB
nathanwhit 8c2910b
Return value from send for backpressure
nathanwhit 9ddf6e3
Fix benchmark to properly listen to backpressure
nathanwhit c58c3aa
Add comment
nathanwhit c19e2e6
Fix off by one bug
nathanwhit adfb302
Fix ref unref and attach channel property
nathanwhit 5057197
patch argv in runner script
nathanwhit dd679bc
Fix refing after channel disconnect
nathanwhit 849036c
Use `NODE_CHANNEL_FD` env var
nathanwhit 88731ff
Remove argv patch because I keep forkbombing myself
nathanwhit d090bf0
Rebase fixup
nathanwhit 852ec72
Use setimmediate
nathanwhit 137db96
Some small tweaks
nathanwhit a6272e9
Fmt + lint
nathanwhit a87bac7
Use setimmediate in bench
nathanwhit c43141c
Windows
nathanwhit 36b6a00
Windows
nathanwhit 4a70d50
Emit child process close event once streams close
nathanwhit 13d98fb
Lints
nathanwhit ab6eda8
Disconnect only defined if using ipc
nathanwhit ef37d3e
Fix inverted condition
nathanwhit 0e4933a
Buffer messages received before listener, proper error
nathanwhit e758030
Add tests + cleanup
nathanwhit 145c205
Some fixes + unit tests
nathanwhit 238745a
Wait for close event in test
nathanwhit b3f3f0d
Add comment + cleanup
nathanwhit faec9d2
make sure to init platform
nathanwhit e863b27
Fix
nathanwhit 61c0f6a
Filter out internal node messages
nathanwhit 34b4115
Windows
nathanwhit eb0ff1b
Windows again
nathanwhit c0ea53d
Disconnect on windows to fix hang
nathanwhit da62777
Fix flipped condition
nathanwhit File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@littledivy just to be sure, we went with
DENO_CHANNEL_FD
because we couldn't communicate between Node.js and Deno subprocesses, right?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup, this PR seems to enable Deno processes spawned by Node processes to communicate. @nathanwhit is it also working the other way around?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, at least on unix (haven't tested windows). Though sending handles won't work (bc we don't support it yet).