diff options
Diffstat (limited to 'tests/ui/attributes/unix_sigpipe/unix_sigpipe-inherit.rs')
-rw-r--r-- | tests/ui/attributes/unix_sigpipe/unix_sigpipe-inherit.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-inherit.rs b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-inherit.rs new file mode 100644 index 000000000..4f8648077 --- /dev/null +++ b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-inherit.rs @@ -0,0 +1,14 @@ +// run-pass +// aux-build:sigpipe-utils.rs + +#![feature(unix_sigpipe)] + +#[unix_sigpipe = "inherit"] +fn main() { + extern crate sigpipe_utils; + + // #[unix_sigpipe = "inherit"] is active, so SIGPIPE shall NOT be ignored, + // instead the default handler shall be installed. (We assume that the + // process that runs these tests have the default handler.) + sigpipe_utils::assert_sigpipe_handler(sigpipe_utils::SignalHandler::Default); +} |