From 43e17454e2d8f650142cb671e13ca70fcbe42fcc Mon Sep 17 00:00:00 2001 From: Martin Nordholts Date: Mon, 24 Oct 2022 20:59:22 +0200 Subject: [PATCH] Remove `rustc_driver::set_sigpipe_handler()` Its usage was removed in 5e624bf4ba and 093b075d32, 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() { // ... ``` --- compiler/rustc_driver/src/lib.rs | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/compiler/rustc_driver/src/lib.rs b/compiler/rustc_driver/src/lib.rs index 7edbb6f757ce1..cfa734c7df39c 100644 --- a/compiler/rustc_driver/src/lib.rs +++ b/compiler/rustc_driver/src/lib.rs @@ -427,18 +427,6 @@ fn run_compiler( }) } -#[cfg(unix)] -pub fn set_sigpipe_handler() { - unsafe { - // Set the SIGPIPE signal handler, so that an EPIPE - // will cause rustc to terminate, as expected. - assert_ne!(libc::signal(libc::SIGPIPE, libc::SIG_DFL), libc::SIG_ERR); - } -} - -#[cfg(windows)] -pub fn set_sigpipe_handler() {} - // Extract output directory and file from matches. fn make_output(matches: &getopts::Matches) -> (Option, Option) { let odir = matches.opt_str("out-dir").map(|o| PathBuf::from(&o));