llrt icon indicating copy to clipboard operation
llrt copied to clipboard

feat: Add execFile Support

Open nithinkjoy-tech opened this issue 8 months ago • 5 comments

Issue

Closes #818

Description of changes

Added execFile support to the child_process module.

Checklist

  • [X] Created unit tests in tests/unit and/or in Rust for my feature if needed
  • [X] Ran make fix to format JS and apply Clippy auto fixes
  • [X] Made sure my code didn't add any additional warnings: make check
  • [X] Updated documentation if needed (API.md/README.md/Other)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

nithinkjoy-tech avatar Apr 20 '25 15:04 nithinkjoy-tech

For reference, the node implementation uses spawn under the cover: https://github.com/nodejs/node/blob/1720b18260d7f4bbd9fe0d2cbbbb05cc33e7f945/lib/child_process.js#L323 and they do in fact set a listener on 'data' to accumulate their callback value. We should go that route too if possible.

Sytten avatar Apr 22 '25 17:04 Sytten

Thank you @Sytten and @richarddavison for the review. I will refactor it to build exec and execFile upon spawn and will try to set a listener on 'data' to accumulate their callback value.

nithinkjoy-tech avatar Apr 26 '25 06:04 nithinkjoy-tech

@nithinkjoy-tech Do you plan on finishing the PR?

Sytten avatar Oct 06 '25 18:10 Sytten

@nithinkjoy-tech Do you plan on finishing the PR? Hi @Sytten, Thanks for following up! I don’t think I’ll be able to continue with this PR since I got stuck earlier and haven’t had the time to get back to it. Totally fine if someone else wants to take it forward.

nithinkjoy-tech avatar Oct 07 '25 16:10 nithinkjoy-tech

@richarddavison Do you want to take that on or not?

Sytten avatar Oct 21 '25 13:10 Sytten