Skip to content

redisNetWrite crashes application process with Signal: SIGPIPE (Broken pipe) on linux if target socket was closed while sending data #1229

@dyumin

Description

@dyumin

Please consider using MSG_NOSIGNAL send() option

MSG_NOSIGNAL (since Linux 2.2)
      Don't generate a SIGPIPE signal if the peer on a stream-oriented
      socket  has closed the connection.  The EPIPE error is still re‐
      turned.  This provides similar behavior to using sigaction(2) to
      ignore SIGPIPE, but, whereas MSG_NOSIGNAL is a per-call feature,
      ignoring SIGPIPE sets  a  process  attribute  that  affects  all
      threads in the process.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions