coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

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

Open Ecordonnier opened this issue 2 weeks ago • 3 comments

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

Ecordonnier avatar Dec 09 '25 12:12 Ecordonnier

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!

github-actions[bot] avatar Dec 09 '25 13:12 github-actions[bot]

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.

Ecordonnier avatar Dec 09 '25 21:12 Ecordonnier

GNU testsuite comparison:

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

github-actions[bot] avatar Dec 09 '25 22:12 github-actions[bot]

GNU testsuite comparison:

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

github-actions[bot] avatar Dec 12 '25 13:12 github-actions[bot]