2 #![allow(unused_imports)]
5 // ignore-android since the dynamic linker sets a SIGPIPE handler (to do
6 // a crash report) so inheritance is moot on the entire platform
8 // libstd ignores SIGPIPE, and other libraries may set signal masks.
9 // Make sure that these behaviors don't get inherited to children
10 // spawned via std::process, since they're needed for traditional UNIX
11 // filter behavior. This test checks that `yes | head` terminates
12 // (instead of running forever), and that it does not print an error
13 // message about a broken pipe.
15 // ignore-emscripten no threads support
16 // ignore-vxworks no 'sh'
23 // Just in case `yes` doesn't check for EPIPE...
25 thread::sleep_ms(5000);
28 let output = process::Command::new("sh").arg("-c").arg("yes | head").output().unwrap();
29 assert!(output.status.success());
30 assert!(output.stderr.len() == 0);
35 // Not worried about signal masks on other platforms