#sigpipe #printing #pipe #error #sig-dfl #rid #child-process #untouched

nightly sigpipe-untouched

Get rid of failed printing to stdout: Broken pipe (os error 32) panics by setting SIGPIPE to SIG_DFL before your fn main() runs

3 unstable releases

Uses new Rust 2024

0.3.1 Feb 4, 2026
0.3.0 Feb 4, 2026
0.1.0 Jan 15, 2026

#2 in #sigpipe

MIT license

3KB

sigpipe-untouched

Makes the Rust standard library leave SIGPIPE completely untouched. In particular, this means SIGPIPE is

Usage

Add

[dependencies]
sigpipe-untouched = "0.3.0"

to your Cargo.toml and

extern crate sigpipe_untouched;

to main.rs to let rustc know it must be linked despite not being explicitly used.

This crate requires nightly Rust.

No runtime deps