leave-sigpipe-alone

Crates.ioleave-sigpipe-alone
lib.rsleave-sigpipe-alone
version0.1.0
created_at2026-01-06 08:04:33.838352+00
updated_at2026-01-06 08:04:33.838352+00
descriptionStops the Rust standard library from changing `SIGPIPE` disposition.
homepagehttps://github.com/Enselic/leave-sigpipe-alone
repositoryhttps://github.com/Enselic/leave-sigpipe-alone
max_upload_size
id2025406
size4,319
Martin Nordholts (Enselic)

documentation

https://docs.rs/leave-sigpipe-alone

README

leave-sigpipe-alone

Normally the Rust standard library code sets SIGPIPE to SIG_IGN before fn main() runs, and resets it to SIG_DFL before executing subprocesses.

If you want the Rust standard library to never change SIGPIPE disposition you can use this crate:

[dependencies]
leave-sigpipe-alone = "0.1.0"

Audit the Code

This crate is tiny and easily audited with the following command 1:

curl -H "User-Agent: $USER at $HOST" \
     -L https://crates.io/api/v1/crates/broken-pipe-kills/0.2.0/download |
tar --extract --gzip --to-stdout |
less

Also See

You might also find these crates useful:

  • broken-pipe-kills kills Rust programs in the face of Broken pipe errors by changing SIGPIPE disposition to SIG_DFL before fn main().

When Can I Use It?

Follow https://github.com/rust-lang/rust/issues/150588 for updates.

Footnotes

  1. but make sure you adhere to the crates.io Data Access Policy.

Commit count: 2

cargo fmt