From 8b7ac4c2a9c3ede95d6f5f9717a1939a23788964 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Fri, 2 Sep 2011 15:34:12 +0200 Subject: Close file descriptors on exec (issue 218) When exec is executed to start a different process image old 0MQ file descriptors could stay open, thus blocking TCP ports and alike. This patch should solve the problem. Signed-off-by: Martin Sustrik --- src/tcp_connecter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tcp_connecter.cpp') diff --git a/src/tcp_connecter.cpp b/src/tcp_connecter.cpp index ac27181..00eb5f6 100644 --- a/src/tcp_connecter.cpp +++ b/src/tcp_connecter.cpp @@ -184,7 +184,7 @@ int zmq::tcp_connecter_t::open () zmq_assert (s == retired_fd); // Create the socket. - s = socket (address.family (), SOCK_STREAM, IPPROTO_TCP); + s = open_socket (address.family (), SOCK_STREAM, IPPROTO_TCP); #ifdef ZMQ_HAVE_WINDOWS if (s == INVALID_SOCKET) { wsa_error_to_errno (); -- cgit v1.2.3