From a33a275e3b0b1942280cae2317801fbd2185821c Mon Sep 17 00:00:00 2001 From: Pieter Hintjens Date: Mon, 18 Jul 2011 12:53:55 +0200 Subject: [PATCH] Fixed issue 230 Signed-off-by: Pieter Hintjens --- src/tcp_socket.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/tcp_socket.cpp b/src/tcp_socket.cpp index 3c9b1fd6..bd3f117f 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; }