Skip to content

fix(child_process): add execArgv support to spawn() - #65741

Open
dajiaohuang wants to merge 1 commit into
nodejs:mainfrom
dajiaohuang:fix/65725-spawn-execargv
Open

fix(child_process): add execArgv support to spawn()#65741
dajiaohuang wants to merge 1 commit into
nodejs:mainfrom
dajiaohuang:fix/65725-spawn-execargv

Conversation

@dajiaohuang

Copy link
Copy Markdown

Fix issue #65725 where spawn() silently ignores the execArgv option.

spawn() now correctly handles execArgv by prepending it to the args array, matching fork() behavior.

The execArgv option passed to spawn() was being silently ignored.
This commit adds proper handling of execArgv in normalizeSpawnArguments(),
prepending the execArgv values to the args array before argv0/file.

Fixes: nodejs#65725
PR-URL: nodejs#65726
@nodejs-github-bot nodejs-github-bot added child_process Issues and PRs related to the child_process subsystem. needs-ci PRs that need a full CI run. labels Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

child_process Issues and PRs related to the child_process subsystem. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants