rust/tests/ui/runtime/on-broken-pipe/with-rustc_main.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
408 B
Rust
Raw Normal View History

//@ run-pass
//@ aux-build:sigpipe-utils.rs
//@ compile-flags: -Zon-broken-pipe=kill
#![feature(rustc_attrs)]
#[rustc_main]
fn rustc_main() {
extern crate sigpipe_utils;
// `-Zon-broken-pipe=kill` is active, so SIGPIPE handler shall be
// SIG_DFL. Note that we have a #[rustc_main], but it should still work.
sigpipe_utils::assert_sigpipe_handler(sigpipe_utils::SignalHandler::Default);
}