Prevent SIGPIPE from socket writes on UNIX-likes When writing to a disconnected socket, try to only get EPIPE rather than taking down the process with SIGPIPE. On recent Linux and other systems which have it, switch from writev to sendmsg and pass MSG_NOSIGNAL. On BSD-likes, set SO_NOSIGPIPE at connect time. https://github.com/krb5/krb5/commit/98bf22027bd6e746f456a671ca5e257ca4bd371e Author: Robbie Harwood Committer: Greg Hudson Commit: 98bf22027bd6e746f456a671ca5e257ca4bd371e Branch: master src/include/port-sockets.h | 43 ++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 40 insertions(+), 3 deletions(-)