coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

env: ignoring SIGPIPE not working

Open Ecordonnier opened this issue 2 weeks ago • 0 comments

After https://github.com/uutils/coreutils/pull/9614 there is a regression in env: ignoring SIGPIPE doesn't work any more, because the rust implementation of Command::exec() resets the SIGPIPE signal handler to its default handler (see https://github.com/rust-lang/rust/blob/c61a3a44d1a5bee35914cada6c788a05e0808f5b/library/std/src/sys/process/unix/unix.rs#L368 ).

This will be fixed in rust at some point ( see https://github.com/rust-lang/rust/issues/97889#issuecomment-2010074982 , https://github.com/rust-lang/rust/issues/62569 , etc.) however with current stable rust version there is no way to make it work with Command::exec().

https://github.com/uutils/coreutils/pull/9614 needs to be reverted, and a regression-tests added.

See also https://github.com/uutils/coreutils/issues/8919 which is related

Ecordonnier avatar Dec 09 '25 20:12 Ecordonnier