1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
pub mod opts; pub const STDERR: &str = "stderr"; pub const STDOUT: &str = "stdout"; pub fn stderr() -> Option<String> { Some(STDERR.to_string()) } pub fn stdout() -> Option<String> { Some(STDOUT.to_string()) } #[cfg(unix)] pub fn reset_sigpipe() { unsafe { libc::signal(libc::SIGPIPE, libc::SIG_DFL); } } #[cfg(not(unix))] pub fn reset_sigpipe() { // no-op }