]> git.proxmox.com Git - rustc.git/blob - src/test/ui/attributes/unix_sigpipe/unix_sigpipe-inherit.rs
New upstream version 1.65.0+dfsg1
[rustc.git] / src / test / ui / attributes / unix_sigpipe / unix_sigpipe-inherit.rs
1 // run-pass
2 // aux-build:sigpipe-utils.rs
3
4 #![feature(unix_sigpipe)]
5
6 #[unix_sigpipe = "inherit"]
7 fn main() {
8 extern crate sigpipe_utils;
9
10 // #[unix_sigpipe = "inherit"] is active, so SIGPIPE shall NOT be ignored,
11 // instead the default handler shall be installed. (We assume that the
12 // process that runs these tests have the default handler.)
13 sigpipe_utils::assert_sigpipe_handler(sigpipe_utils::SignalHandler::Default);
14 }