| Crates.io | leave-sigpipe-alone |
| lib.rs | leave-sigpipe-alone |
| version | 0.1.0 |
| created_at | 2026-01-06 08:04:33.838352+00 |
| updated_at | 2026-01-06 08:04:33.838352+00 |
| description | Stops the Rust standard library from changing `SIGPIPE` disposition. |
| homepage | https://github.com/Enselic/leave-sigpipe-alone |
| repository | https://github.com/Enselic/leave-sigpipe-alone |
| max_upload_size | |
| id | 2025406 |
| size | 4,319 |
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"
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
You might also find these crates useful:
Broken pipe errors by changing SIGPIPE disposition to SIG_DFL before fn main().Follow https://github.com/rust-lang/rust/issues/150588 for updates.
but make sure you adhere to the crates.io Data Access Policy. ↩