diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2022-10-26 11:29:57 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-26 11:29:57 +0530 |
| commit | d159124dbd8066a29fbc826dd7793805cf29fba5 (patch) | |
| tree | cd620fe6407e52bfe1be9d40c5b6042e0a4445f3 /compiler/rustc_driver/src | |
| parent | 39e0e2cc241c03b9550dc876d182f9977a45ba82 (diff) | |
| parent | 43e17454e2d8f650142cb671e13ca70fcbe42fcc (diff) | |
| download | rust-d159124dbd8066a29fbc826dd7793805cf29fba5.tar.gz rust-d159124dbd8066a29fbc826dd7793805cf29fba5.zip | |
Rollup merge of #103536 - Enselic:remove-set_sigpipe_handler, r=tmiasko
Remove `rustc_driver::set_sigpipe_handler()`
Its usage was removed in https://github.com/rust-lang/rust/pull/102587 and https://github.com/rust-lang/rust/pull/103495, 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 explicitly unstable API, and can just straight up remove it.
PR that added `set_sigpipe_handler`: https://github.com/rust-lang/rust/pull/49606
Tracking issue for `unix_sigpipe`: #97889
Migration instructions for any remaining clients
---
Change from
```rust
#![feature(rustc_private)]
extern crate rustc_driver;
fn main() {
rustc_driver::set_sigpipe_handler();
// ...
```
to
```rust
#![feature(unix_sigpipe)]
#[unix_sigpipe = "sig_dfl"]
fn main() {
// ...
```
``@rustbot`` labels +T-compiler
Diffstat (limited to 'compiler/rustc_driver/src')
| -rw-r--r-- | compiler/rustc_driver/src/lib.rs | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/compiler/rustc_driver/src/lib.rs b/compiler/rustc_driver/src/lib.rs index 7edbb6f757c..cfa734c7df3 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<PathBuf>, Option<PathBuf>) { let odir = matches.opt_str("out-dir").map(|o| PathBuf::from(&o)); |
