2022-07-05 12:56:22 -05:00
|
|
|
//@ run-pass
|
|
|
|
//@ aux-build:sigpipe-utils.rs
|
2024-04-28 11:02:21 -05:00
|
|
|
//@ compile-flags: -Zon-broken-pipe=kill
|
2024-04-18 15:50:06 -05:00
|
|
|
//@ only-unix because SIGPIPE is a unix thing
|
2022-07-05 12:56:22 -05:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
extern crate sigpipe_utils;
|
|
|
|
|
2024-04-28 11:02:21 -05:00
|
|
|
// `-Zon-broken-pipe=kill` is active, so SIGPIPE shall NOT be ignored, instead
|
2022-07-05 12:56:22 -05:00
|
|
|
// the default handler shall be installed
|
|
|
|
sigpipe_utils::assert_sigpipe_handler(sigpipe_utils::SignalHandler::Default);
|
|
|
|
}
|