Skip to content

Commit

Permalink
Rollup merge of rust-lang#103495 - Enselic:rustdoc-unix_sigpipe, r=no…
Browse files Browse the repository at this point in the history
…triddle

rustdoc: Use `unix_sigpipe` instead of `rustc_driver::set_sigpipe_handler`

Do what was already done for `rustc` in rust-lang#102587, namely start using `unix_sigpipe` instead of `rustc_driver::set_sigpipe_handler`.

After this has been merged, we can completely remove `rustc_driver::set_sigpipe_handler`.

PR that added `set_sigpipe_handler`: rust-lang#49606

Tracking issue for `unix_sigpipe`: rust-lang#97889

Verification of this change
---------------------------

1. Remove `#[unix_sigpipe = "sig_dfl"]`
1. Run `./x.py build`
1. Run `./build/aarch64-apple-darwin/stage1/bin/rustdoc --help | false`
1. Observe ICE
1. Add back `#[unix_sigpipe = "sig_dfl"]`
1. Run `./x.py build`
1. Run `./build/aarch64-apple-darwin/stage1/bin/rustdoc --help | false`
1. Observe ICE fixed

`@rustbot` labels +T-rustdoc
  • Loading branch information
Yuki Okushi authored Oct 24, 2022
2 parents 58a2a93 + 5e624bf commit f5f62d8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/librustdoc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ pub fn main() {
}
}

rustc_driver::set_sigpipe_handler();
rustc_driver::install_ice_hook();

// When using CI artifacts (with `download_stage1 = true`), tracing is unconditionally built
Expand Down
3 changes: 3 additions & 0 deletions src/tools/rustdoc/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#![feature(unix_sigpipe)]

#[unix_sigpipe = "sig_dfl"]
fn main() {
rustdoc::main()
}

0 comments on commit f5f62d8

Please sign in to comment.