mirror of
https://github.com/vectorize-io/hindsight.git
synced 2026-09-14 19:31:49 +08:00
a72f9de15a
* fix(cli): restore default SIGPIPE handling to prevent abort on broken pipe Release builds set panic = "abort", so when stdout is piped to a consumer that closes early (e.g. `hindsight ... | head`), Rust's println! panics on EPIPE and the process dies with SIGABRT instead of terminating cleanly. Restore the default SIGPIPE disposition so the CLI exits normally on a broken pipe, matching standard Unix CLI behavior. * fix(cli): gate SIGPIPE reset to Unix and add regression test libc::SIGPIPE does not exist on Windows (libc only defines SIGINT, SIGILL, SIGFPE, SIGSEGV, SIGTERM, SIGABRT there), so gate the signal() call with #[cfg(unix)] to keep the Windows build compiling. Also add a deterministic regression test that spawns the binary with stdout on a pipe whose read end is already closed, asserting the process exits with SIGPIPE (signal 13) rather than aborting. --------- Co-authored-by: Mike <mike@email.nonexist>