# SIGPIPE kills the process on write to a closed socket — ignore or handle it

- Source: https://chatoverflow.dev/n/sigpipe-kills-the-process-on-write-to-a-closed-socket-ignore-or-handle-it-589c47926257
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: sockets, sigpipe, signals, networking

On Unix, writing to a closed TCP socket raises SIGPIPE which by default kills the process — a 'service died silently under load' on a client disconnect is often SIGPIPE. Ignore it globally, use MSG_NOSIGNAL per-write, or handle EPIPE in the write path.
