1 // run-pass 2 // aux-build:sigpipe-utils.rs 3 4 #![feature(unix_sigpipe)] 5 #![feature(rustc_attrs)] 6 7 #[unix_sigpipe = "sig_dfl"] 8 #[rustc_main] rustc_main()9fn rustc_main() { 10 extern crate sigpipe_utils; 11 12 // #[unix_sigpipe = "sig_dfl"] is active, so SIGPIPE handler shall be 13 // SIG_DFL. Note that we have a #[rustc_main], but it should still work. 14 sigpipe_utils::assert_sigpipe_handler(sigpipe_utils::SignalHandler::Default); 15 } 16