Skip to content

nice: use Command::exec() instead of libc::execvp() - #9612

Merged
sylvestre merged 2 commits into
uutils:mainfrom
Ecordonnier:eco/nice-command-exec
Dec 30, 2025
Merged

nice: use Command::exec() instead of libc::execvp()#9612
sylvestre merged 2 commits into
uutils:mainfrom
Ecordonnier:eco/nice-command-exec

Conversation

@Ecordonnier

@Ecordonnier Ecordonnier commented Dec 9, 2025

Copy link
Copy Markdown
Collaborator

No need to use the unsafe libc::execvp(), the standard rust library provides the functionality via Command::exec().

@Ecordonnier
Ecordonnier force-pushed the eco/nice-command-exec branch from b753358 to 260e7ac Compare December 9, 2025 12:44
@github-actions

github-actions Bot commented Dec 9, 2025

Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/tail/overlay-headers (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/cksum/b2sum is no longer failing!

@Ecordonnier Ecordonnier closed this Dec 9, 2025
@Ecordonnier Ecordonnier reopened this Dec 9, 2025
@Ecordonnier

Copy link
Copy Markdown
Collaborator Author

Note that Command::exec() restores the default SIGPIPE signal handler (the rust startup code disables SIGPIPE signal handler). However in this particular case, I think having the default SIGPIPE signal handler is what we want anyway.

@github-actions

github-actions Bot commented Dec 9, 2025

Copy link
Copy Markdown

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/overlay-headers (passes in this run but fails in the 'main' branch)

@Ecordonnier
Ecordonnier force-pushed the eco/nice-command-exec branch from 260e7ac to 32bae2b Compare December 12, 2025 13:28
@github-actions

Copy link
Copy Markdown

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/overlay-headers (passes in this run but fails in the 'main' branch)

No need to use the unsafe `libc::execvp()`, the standard rust library provides
the functionality via the safe function `Command::exec()`.

Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
@sylvestre
sylvestre force-pushed the eco/nice-command-exec branch from 32bae2b to 5aa91f2 Compare December 26, 2025 23:03
@sylvestre
sylvestre merged commit a15ca8f into uutils:main Dec 30, 2025
128 checks passed
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.

2 participants