1
Fork 0

tests: cleanup tests/ui/process/sigpipe-should-be-ignored.rs

- Unwrap a must-use I/O result and remove `#![allow(unused_must_use)]`.
- Replace `ignore-*` with `needs-subprocess`.
This commit is contained in:
许杰友 Jieyou Xu (Joe) 2025-01-23 16:16:03 +08:00
parent 7eaa6ec8f7
commit 0cc392e5fa

View file

@ -1,12 +1,9 @@
//@ run-pass
//@ needs-subprocess
#![allow(unused_must_use)]
// Be sure that when a SIGPIPE would have been received that the entire process
// doesn't die in a ball of fire, but rather it's gracefully handled.
//@ ignore-wasm32 no processes
//@ ignore-sgx no processes
use std::env;
use std::io::prelude::*;
use std::io;
@ -14,7 +11,7 @@ use std::process::{Command, Stdio};
fn test() {
let _ = io::stdin().read_line(&mut String::new());
io::stdout().write(&[1]);
io::stdout().write(&[1]).unwrap();
assert!(io::stdout().flush().is_err());
}