Skip to content

Conversation

richardlau
Copy link
Member

The env parameter for process.execve is documented to default to process.env.

Refs: nodejs/build#4156 (comment)


process.execve is documented to take an optional env parameter that is supposed to default to process.env:

node/doc/api/process.md

Lines 1694 to 1708 in 2e5c8df

## `process.execve(file[, args[, env]])`
<!-- YAML
added:
- v23.11.0
- v22.15.0
-->
> Stability: 1 - Experimental
* `file` {string} The name or path of the executable file to run.
* `args` {string\[]} List of string arguments. No argument can contain a null-byte (`\u0000`).
* `env` {Object} Environment key-value pairs.
No key or value can contain a null-byte (`\u0000`).
**Default:** `process.env`.

When we attempted to build a sharedlibs_* CI with clang we found that parallel/test-process-execve-no-args fails because process.execve is not passing on process.env to the new process. We didn't notice before when using gcc because on Ubuntu (and other Debian-derived Linux distributions) gcc by default links with --as-needed but clang (and gcc on other Linux distributions) does not.

No new test is added, this will unblock the work being done in nodejs/build#4156 and once that is complete regressions will be caught there by the existing parallel/test-process-execve-no-args.

The `env` parameter for `process.execve` is documented to default
to `process.env`.
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. process Issues and PRs related to the process subsystem. labels Sep 26, 2025
@richardlau
Copy link
Member Author

cc @nodejs/process

@richardlau richardlau added request-ci Add this label to start a Jenkins CI on a PR. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Sep 26, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Sep 26, 2025
@nodejs-github-bot
Copy link
Collaborator

Copy link

codecov bot commented Sep 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.47%. Comparing base (3312e4e) to head (7db323e).
⚠️ Report is 30 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #60029      +/-   ##
==========================================
- Coverage   88.47%   88.47%   -0.01%     
==========================================
  Files         703      703              
  Lines      207546   207544       -2     
  Branches    40006    40011       +5     
==========================================
- Hits       183631   183615      -16     
- Misses      15907    15909       +2     
- Partials     8008     8020      +12     
Files with missing lines Coverage Δ
lib/internal/process/per_thread.js 99.81% <100.00%> (-0.01%) ⬇️

... and 28 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aduh95 aduh95 added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Sep 30, 2025
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@richardlau richardlau added the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 1, 2025
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 1, 2025
@nodejs-github-bot nodejs-github-bot merged commit b8ea0e8 into nodejs:main Oct 1, 2025
68 of 69 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in b8ea0e8

@richardlau richardlau deleted the execve-no-args branch October 6, 2025 16:00
targos pushed a commit that referenced this pull request Oct 6, 2025
The `env` parameter for `process.execve` is documented to default
to `process.env`.

PR-URL: #60029
Refs: nodejs/build#4156
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. needs-ci PRs that need a full CI run. process Issues and PRs related to the process subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants