Draft
Conversation
Add op_node_process_execve Rust op that calls libc::execve on Unix. Add JavaScript execve function with input validation in process.ts. Add spec test for process.execve. Co-authored-by: bartlomieju <13602871+bartlomieju@users.noreply.github.com>
…ing node_compat tests Co-authored-by: bartlomieju <13602871+bartlomieju@users.noreply.github.com>
Co-authored-by: bartlomieju <13602871+bartlomieju@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add support for node:process's execve() function
feat: support Mar 9, 2026
node:process's execve()
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.
Implements
process.execve()from Node.js 22.15.0 LTS, which replaces the current process via the POSIXexecvesyscall. Unix-only, experimental.Changes
ext/node/ops/process.rs: Newop_node_process_execve— converts args/env to CStrings, callslibc::execve. ReturnsNotSupportedon non-Unix. Gated behindcheck_run_all.ext/node/polyfills/process.ts: JSexecve()with Node-matching validation (execPath,args,envnull-byte checks), worker thread guard (ERR_WORKER_UNSUPPORTED_OPERATION), platform guard (ERR_FEATURE_UNAVAILABLE_ON_PLATFORM). Only exposed on non-Windows.ext/node/lib.rs: Op registration.tests/specs/node/process_execve/: Spec test covering the end-to-end replace-and-verify flow.tests/node_compat/config.jsonc: Addedtest-process-execve-validation.jsandtest-process-execve-worker-threads.js(both passing).Note on
test-process-execve.jsThe main Node.js compat test calls
execveto re-invoke the deno binary without-A, so the replacement process lacks permissions. This is inherent toexecvereplacing the process image. The validation and worker-thread tests pass; the end-to-end flow is covered by the spec test which includes-Ain the replacement args.Original prompt
node:process'sexecve()#29017💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.