Prevent EPIPE causing ICEs in rustc and rustdoc
This commit is contained in:
@@ -80,11 +80,11 @@ pub fn init() {
|
||||
reset_sigpipe();
|
||||
}
|
||||
|
||||
#[cfg(not(any(target_os = "emscripten", target_os="fuchsia")))]
|
||||
#[cfg(not(any(target_os = "emscripten", target_os = "fuchsia")))]
|
||||
unsafe fn reset_sigpipe() {
|
||||
assert!(signal(libc::SIGPIPE, libc::SIG_IGN) != libc::SIG_ERR);
|
||||
}
|
||||
#[cfg(any(target_os = "emscripten", target_os="fuchsia"))]
|
||||
#[cfg(any(target_os = "emscripten", target_os = "fuchsia"))]
|
||||
unsafe fn reset_sigpipe() {}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user