Skip to content

Commit 43e1745

Browse files
committedOct 25, 2022
Remove rustc_driver::set_sigpipe_handler()
Its usage was removed in 5e624bf and 093b075, so we do not need to keep it around any longer. According to [preliminary input](https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/Find.20.60rustc_driver.60.20dependent.20projects.3F/near/304490764), we do not need to worry about any deprecation cycle for this API and can just straight up remove it. Migration instructions for remaining clients -------------------------------------------- Change from ```rust extern crate rustc_driver; fn main() { rustc_driver::set_sigpipe_handler(); // ... ``` to ```rust fn main() { // ... ```
1 parent 85d089b commit 43e1745

File tree

1 file changed

+0
-12
lines changed
  • compiler/rustc_driver/src

1 file changed

+0
-12
lines changed
 

‎compiler/rustc_driver/src/lib.rs

-12
Original file line numberDiff line numberDiff line change
@@ -427,18 +427,6 @@ fn run_compiler(
427427
})
428428
}
429429

430-
#[cfg(unix)]
431-
pub fn set_sigpipe_handler() {
432-
unsafe {
433-
// Set the SIGPIPE signal handler, so that an EPIPE
434-
// will cause rustc to terminate, as expected.
435-
assert_ne!(libc::signal(libc::SIGPIPE, libc::SIG_DFL), libc::SIG_ERR);
436-
}
437-
}
438-
439-
#[cfg(windows)]
440-
pub fn set_sigpipe_handler() {}
441-
442430
// Extract output directory and file from matches.
443431
fn make_output(matches: &getopts::Matches) -> (Option<PathBuf>, Option<PathBuf>) {
444432
let odir = matches.opt_str("out-dir").map(|o| PathBuf::from(&o));

0 commit comments

Comments
 (0)
Please sign in to comment.