Skip to content

feat(signals): raised SIGPIPE for writes with no reader - #170

Merged
FlareCoding merged 1 commit into
masterfrom
pr/sigpipe
Aug 13, 2026
Merged

feat(signals): raised SIGPIPE for writes with no reader#170
FlareCoding merged 1 commit into
masterfrom
pr/sigpipe

Conversation

@FlareCoding

Copy link
Copy Markdown
Owner

Summary

  • Writes to a closed pipe or shut-down TCP stream only reported EPIPE, so pipeline writers that never check errors looped forever instead of dying the POSIX way.
  • The two failing write sites now raise SIGPIPE in the writer, with the existing disposition machinery handling the rest: default kills with a signaled wait status, SIG_IGN drops it so EPIPE surfaces, and an installed handler is delivered with the EPIPE result.
  • Pty writes stay signal-free (Linux gives ptys EIO-class errors) and MSG_NOSIGNAL is deferred until a TCP sendto op exists, since write() has no flag path on Linux either.

Made with Cursor

A write to a closed pipe or shut-down TCP stream only reported EPIPE,
so naive pipeline writers looped on errors instead of dying the POSIX
way. The failing write sites now raise SIGPIPE in the writer, and the
existing disposition machinery kills, delivers, or drops it.

Co-authored-by: Cursor <cursoragent@cursor.com>
@FlareCoding
FlareCoding merged commit f3c0164 into master Aug 13, 2026
15 checks passed
@FlareCoding
FlareCoding deleted the pr/sigpipe branch August 13, 2026 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant