summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/tcp_socket.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tcp_socket.cpp b/src/tcp_socket.cpp
index 3c9b1fd..bd3f117 100644
--- a/src/tcp_socket.cpp
+++ b/src/tcp_socket.cpp
@@ -158,6 +158,12 @@ int zmq::tcp_socket_t::open (fd_t fd_, int sndbuf_, int rcvbuf_)
errno_assert (rc == 0);
}
+#if defined ZMQ_HAVE_OSX || defined ZMQ_HAVE_FREEBSD
+ int set = 1;
+ int rc = setsockopt (s, SOL_SOCKET, SO_NOSIGPIPE, &set, sizeof (int));
+ errno_assert (rc == 0);
+#endif
+
return 0;
}