Skip to content

env: use execvp instead of Command::status on Unix systems#8365

Merged
cakebaker merged 1 commit into
uutils:mainfrom
yuankunzhang:env-exec
Jul 22, 2025
Merged

env: use execvp instead of Command::status on Unix systems#8365
cakebaker merged 1 commit into
uutils:mainfrom
yuankunzhang:env-exec

Conversation

@yuankunzhang

Copy link
Copy Markdown
Contributor

Closes #8361.

@github-actions

Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/misc/stdbuf (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)

Comment thread src/uu/env/src/env.rs Outdated

@cakebaker cakebaker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clippy complains about two unneeded return statements on Windows, otherwise it looks good.

@yuankunzhang

Copy link
Copy Markdown
Contributor Author

clippy complains about two unneeded return statements on Windows, otherwise it looks good.

Addressed.

@cakebaker cakebaker merged commit 8e83822 into uutils:main Jul 22, 2025
112 of 114 checks passed
@cakebaker

Copy link
Copy Markdown
Contributor

Thanks!

@Ecordonnier

Ecordonnier commented Dec 9, 2025

Copy link
Copy Markdown
Collaborator

@yuankunzhang can you please have a look at #9614 , it uses Command::exec() instead of the call to libc::execvp() which was introduced in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

env(1) forks, but must exec() directly

4 participants