feat(child_process): add exec and execFile functions#1302
Open
chessbyte wants to merge 1 commit intoawslabs:mainfrom
Open
feat(child_process): add exec and execFile functions#1302chessbyte wants to merge 1 commit intoawslabs:mainfrom
chessbyte wants to merge 1 commit intoawslabs:mainfrom
Conversation
richarddavison
requested changes
Dec 23, 2025
Collaborator
richarddavison
left a comment
There was a problem hiding this comment.
Thanks for the PR! This is a great addition but this API needs to be implemented in Rust. The main philosophy of LLRT is to implement as much as possible in Rust due to the relatively costly execution of interpreter code in QJS)
Collaborator
There was a problem hiding this comment.
Move this implementation to Rust to avoid performance overhead of QJS
Contributor
Author
There was a problem hiding this comment.
I am on it. Not sure why I went in this direction in the first place.
3aee8ce to
ccf1b02
Compare
Implements exec() and execFile() for the child_process module, matching the Node.js API. Key features: - Callback-based API with (error, stdout, stderr) signature - Shell execution for exec(), direct execution for execFile() - Support for options: cwd, env, timeout, maxBuffer, killSignal, shell - Preserves partial output data on timeout - Uses Persistent<Function> pattern for async callback safety
ccf1b02 to
f3a8d47
Compare
Contributor
Author
|
@richarddavison rewrote it as per your patient feedback. |
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.
Issue # (if available)
Closes #818
Description of changes
Implements exec and execFile on top of spawn following the Node.js pattern, as suggested in PR #949 review feedback. Uses direct Rust async I/O for output accumulation.
Checklist
tests/unitand/or in Rust for my feature if neededmake fixto format JS and apply Clippy auto fixesmake checktypes/directoryBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.