Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/uucore/src/lib/mods/panic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ pub fn preserve_inherited_sigpipe() {
use nix::libc;

// Check if parent specified that SIGPIPE should be default
if let Ok(val) = std::env::var("RUST_SIGPIPE")
&& val == "default"
{
if std::env::var_os("RUST_SIGPIPE").is_some_and(|v| v == "default") {
unsafe { libc::signal(libc::SIGPIPE, libc::SIG_DFL) };
// Remove the environment variable so child processes don't inherit it incorrectly
unsafe { std::env::remove_var("RUST_SIGPIPE") };
Expand Down
Loading