rust/tests/ui/runtime/on-broken-pipe/kill.rs
2024-05-20 11:13:10 -04:00

13 lines
390 B
Rust

//@ run-pass
//@ aux-build:sigpipe-utils.rs
//@ compile-flags: -Zon-broken-pipe=kill
//@ only-unix because SIGPIPE is a unix thing
fn main() {
extern crate sigpipe_utils;
// `-Zon-broken-pipe=kill` is active, so SIGPIPE shall NOT be ignored, instead
// the default handler shall be installed
sigpipe_utils::assert_sigpipe_handler(sigpipe_utils::SignalHandler::Default);
}