mirror of
https://github.com/zeromq/libzmq.git
synced 2025-11-11 18:17:14 +01:00
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>
This commit is contained in:
@@ -126,7 +126,7 @@ int zmq::tcp_listener_t::set_address (const char *addr_)
|
||||
return -1;
|
||||
|
||||
// Create a listening 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 ();
|
||||
|
||||
Reference in New Issue
Block a user