mirror of
https://github.com/uutils/uucore.git
synced 2026-06-10 15:48:52 -07:00
change ~ improve naming and documentation of default SIGPIPE handling
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
// spell-checker:ignore () SIGPIPE maint uutils
|
||||
|
||||
use std::panic;
|
||||
|
||||
pub fn install_sigpipe_hook() {
|
||||
//## SIGPIPE handling background/discussions ...
|
||||
//* `uutils` ~ <https://github.com/uutils/coreutils/issues/374> , <https://github.com/uutils/coreutils/pull/1106>
|
||||
//* rust and `rg` ~ <https://github.com/rust-lang/rust/issues/62569> , <https://github.com/BurntSushi/ripgrep/issues/200> , <https://github.com/crev-dev/cargo-crev/issues/287>
|
||||
|
||||
pub fn mute_sigpipe_panic() {
|
||||
let hook = panic::take_hook();
|
||||
panic::set_hook(Box::new(move |info| {
|
||||
if let Some(res) = info.payload().downcast_ref::<String>() {
|
||||
|
||||
Reference in New Issue
Block a user