From a0f93c16cf884c9404460ff37bd403082c9dba09 Mon Sep 17 00:00:00 2001 From: Markus Fritsche Date: Thu, 23 Jul 2026 01:05:39 +0200 Subject: [PATCH] sicd: add SIGPIPE/SIG_IGN porting note at EPIPE catch site CPython sets SIGPIPE to SIG_IGN so EPIPE surfaces as BrokenPipeError. A Go port must replicate this explicitly or the EPIPE path silently becomes a SIGPIPE death. 24/24 green. --- gateway/sicd | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gateway/sicd b/gateway/sicd index 744b343..eef6b8f 100755 --- a/gateway/sicd +++ b/gateway/sicd @@ -113,6 +113,10 @@ def main() -> None: break write_all(w_fd, chunk) except BrokenPipeError: + # CPython sets SIGPIPE to SIG_IGN at startup, so EPIPE surfaces + # as BrokenPipeError instead of killing the process. A port to + # another language (Go, etc.) must replicate this explicitly or + # the EPIPE path silently becomes a SIGPIPE death. pass except OSError as e: sys.stderr.write(f"sicd: stdin read error: {e}\n")