You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SIGPIPE kills perry programs; node ignores it — claude … | head exits 141 and dies mid-write #9402
claude auto-mode defaults | head -2
node : rc=0 perry: rc=141
Deterministic, 3/3 each.
Node installs a SIGPIPE handler (or ignores the signal) so a program whose reader closes early finishes normally and sees EPIPE on write. Perry inherits the default disposition, so the process is killed mid-write by any truncating consumer: | head, | grep -q, | less and quitting, a closed socket.
This also caused an unrelated-looking suite failure (hooks case: perry rc=-13 vs node rc=1), so it will keep producing confusing secondary symptoms until fixed.
Fix: ignore SIGPIPE at runtime startup (signal(SIGPIPE, SIG_IGN)) and let writes return EPIPE, which is what every JS runtime does. Worth pairing with a check that write errors surface as JS-visible errors rather than being swallowed.
Found by a differential stress-test of cc 2.1.112 under perry 757beace0.
Activity
fix(runtime): SIGPIPE and non-UTF-8 argv (from #9418) (#9419)
proggeramlug commentedon Sep 2, 2026
Closing: fixed in #9419 (from #9418); verified with a 200k-line writer piped into head -3 exiting 0.