Open mulark opened 2 years ago
Interesting. Does this reproduce with head every time for you? I was just reading the discussion and noted these responses which sound simple enough? "Until someone implements and merges unignore_sigpipe(), your best bet will be to use the write!() macro instead of the print*!() family of macros, and then handle errors appropriately."
write! isn't hard: see here for one example of how to use it in production. Note that literally the only difference as far as the app is concerned is the gratuitous use of ? to handle potential errors.
A potential alternative is to remove the sigpipe handler using libc, which is already a part of our dependency tree.
unsafe {
libc::signal(libc::SIGPIPE, libc::SIG_DFL);
}