Skip to content

Commit

Permalink
Fix Windows: Use SIGPIPE on Unix only. (#184)
Browse files Browse the repository at this point in the history
  • Loading branch information
clux authored Jan 9, 2024
2 parents 9ee650b + 06a679c commit c628844
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ async fn main() -> Result<()> {
env_logger::init();
// Ignore SIGPIPE errors to avoid having to use let _ = write! everywhere
// See https://github.com/rust-lang/rust/issues/46016
#[cfg(unix)]
unsafe {
libc::signal(libc::SIGPIPE, libc::SIG_DFL);
}
Expand Down

0 comments on commit c628844

Please sign in to comment.