Skip to content

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

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

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

Conversation

@Ecordonnier
Copy link
Collaborator

@Ecordonnier Ecordonnier commented Dec 9, 2025

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
Copy link

github-actions bot commented Dec 9, 2025

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
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
Copy link

github-actions bot commented Dec 9, 2025

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

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
naoNao89 pushed a commit to naoNao89/coreutils that referenced this pull request Dec 31, 2025
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>
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
naoNao89 pushed a commit to naoNao89/coreutils that referenced this pull request Jan 1, 2026
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>
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
sgmarz pushed a commit to sgmarz/coreutils that referenced this pull request Jan 7, 2026
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>
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
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