summaryrefslogtreecommitdiff
path: root/src/tcp_connecter.cpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2011-09-02 15:34:12 +0200
committerMartin Sustrik <sustrik@250bpm.com>2011-09-02 15:34:12 +0200
commit8b7ac4c2a9c3ede95d6f5f9717a1939a23788964 (patch)
tree9afa85cda119a35f2dcd18eb7ff77e92cb8bd78a /src/tcp_connecter.cpp
parent2910a728dc777068e6ae7f67041da185b0865171 (diff)
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 <sustrik@250bpm.com>
Diffstat (limited to 'src/tcp_connecter.cpp')
-rw-r--r--src/tcp_connecter.cpp2
1 files changed, 1 insertions, 1 deletions
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 ();