We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 50ca60a commit 26223adCopy full SHA for 26223ad
src/uucore/src/lib/mods/panic.rs
@@ -52,9 +52,7 @@ pub fn preserve_inherited_sigpipe() {
52
use nix::libc;
53
54
// Check if parent specified that SIGPIPE should be default
55
- if let Ok(val) = std::env::var("RUST_SIGPIPE")
56
- && val == "default"
57
- {
+ if std::env::var_os("RUST_SIGPIPE").is_some_and(|v| v == "default") {
58
unsafe { libc::signal(libc::SIGPIPE, libc::SIG_DFL) };
59
// Remove the environment variable so child processes don't inherit it incorrectly
60
unsafe { std::env::remove_var("RUST_SIGPIPE") };
0 commit comments