chiark / gitweb /
Revert "ipif: Do not grumble about ipif getting sigpipe, if we are quitting"
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 8 Aug 2021 00:48:36 +0000 (01:48 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 8 Aug 2021 00:48:36 +0000 (01:48 +0100)
This reverts commit ceb9a34ac113484065b5bcbb1b6dccf263e1a42b.

src/ipif.rs
src/prelude.rs

index 9b57086edffad2c5e23122cc93d0ce0d4c5b7b05..5364e3757a412553321302445000b896946f8c67 100644 (file)
@@ -61,20 +61,7 @@ impl Ipif {
           Ok(Ok(Err(e))) => error!("{}ipif stderr read failed: {}", icd, e),
           Ok(Ok(Ok(()))) => { },
         }
-
-        fn is_sigpipe(st: ExitStatus) -> bool {
-          #[cfg(unix)] {
-            use std::os::unix::process::ExitStatusExt;
-            const SIGPIPE: i32 = 13;
-            if st.code() == Some(SIGPIPE+128) { return true }
-            if st.signal() == Some(SIGPIPE) { return true }
-          }
-          false
-        }
-        if st.success() {
-        } else if is_sigpipe(st) {
-          debug!("{}ipif process got SIGPIPE: {}", icd, st);
-        } else {
+        if ! st.success() {
           error!("{}ipif process failed: {}", icd, st);
         }
       }
index beab58f0786b168e42d13a8ed96f0a24c9eb9ca8..c0516d28e88672a0efd2eb40f453dc555710551f 100644 (file)
@@ -17,7 +17,7 @@ pub use std::mem;
 pub use std::net::{IpAddr, Ipv4Addr, Ipv6Addr};
 pub use std::path::{Path, PathBuf};
 pub use std::panic;
-pub use std::process::{self, ExitStatus};
+pub use std::process;
 pub use std::pin::Pin;
 pub use std::str::{self, FromStr};
 pub use std::sync::Arc;