fix: correct misleading SIGPIPE comment (#776)

The comment said "Ignore SIGPIPE" but the code actually resets SIGPIPE
to SIG_DFL (default behavior = process termination), not SIG_IGN (ignore).
Updated the comment to accurately describe what the code does and why.

Co-authored-by: hyunjinee <leehj0110@kakao.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
jin.2
2026-03-14 06:33:20 -05:00
committed by GitHub
co-authored by hyunjinee Claude Opus 4.6
parent 790123f9af
commit 67986adffc
+2 -1
View File
@@ -164,7 +164,8 @@ fn run_session(args: &[String], session: &str, json_mode: bool) {
}
fn main() {
// Ignore SIGPIPE to prevent panic when piping to head/tail
// Rust ignores SIGPIPE by default, causing println! to panic on broken pipes.
// Reset to SIG_DFL so the OS terminates the process cleanly instead.
#[cfg(unix)]
unsafe {
libc::signal(libc::SIGPIPE, libc::SIG_DFL);