Ok(Ok(Err(e))) => error!("{}ipif stderr read failed: {}", icd, e),
Ok(Ok(Ok(()))) => { },
}
- if ! st.success() {
+
+ 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 {
error!("{}ipif process failed: {}", icd, st);
}
}
pub use std::net::{IpAddr, Ipv4Addr, Ipv6Addr};
pub use std::path::{Path, PathBuf};
pub use std::panic;
-pub use std::process;
+pub use std::process::{self, ExitStatus};
pub use std::pin::Pin;
pub use std::str::{self, FromStr};
pub use std::sync::Arc;