summaryrefslogtreecommitdiff
path: root/server-tools
diff options
context:
space:
mode:
authorunknown <petr/cps@outpost.site>2006-12-04 19:48:49 +0300
committerunknown <petr/cps@outpost.site>2006-12-04 19:48:49 +0300
commit2beef6d5f4fdffb288b561ad7c8f510507cf46f1 (patch)
treecbc8df8bbab49e345026be4cf0e6ba239e352137 /server-tools
parentffc103ca7dc9aa346ebc033e9cf81a3b5d47b057 (diff)
downloadmariadb-git-2beef6d5f4fdffb288b561ad7c8f510507cf46f1.tar.gz
Fix Bug #19044 IM aborts on exit
On windows IM aborted on assert once one stoppped it. The reason is that we didn't close the sockets on windows and therefore, the listener thread wasn't able to finish. This happened because we used close() call for it. While on windows one should use closesocket(). On other platfroms we have appropriate defines for closesocket(), so this is the function which should be used. server-tools/instance-manager/listener.cc: close -> closesocket
Diffstat (limited to 'server-tools')
-rw-r--r--server-tools/instance-manager/listener.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/server-tools/instance-manager/listener.cc b/server-tools/instance-manager/listener.cc
index 3f60c2cc74a..70cd7360f0d 100644
--- a/server-tools/instance-manager/listener.cc
+++ b/server-tools/instance-manager/listener.cc
@@ -188,7 +188,7 @@ void Listener_thread::run()
else
{
shutdown(client_fd, SHUT_RDWR);
- close(client_fd);
+ closesocket(client_fd);
}
}
}
@@ -200,7 +200,7 @@ void Listener_thread::run()
log_info("Listener_thread::run(): shutdown requested, exiting...");
for (i= 0; i < num_sockets; i++)
- close(sockets[i]);
+ closesocket(sockets[i]);
#ifndef __WIN__
unlink(unix_socket_address.sun_path);
@@ -213,7 +213,7 @@ void Listener_thread::run()
err:
// we have to close the ip sockets in case of error
for (i= 0; i < num_sockets; i++)
- close(sockets[i]);
+ closesocket(sockets[i]);
thread_registry.unregister_thread(&thread_info);
thread_registry.request_shutdown();
@@ -260,7 +260,7 @@ int Listener_thread::create_tcp_socket()
{
log_error("Listener_thread::run(): bind(ip socket) failed, '%s'",
strerror(errno));
- close(ip_socket);
+ closesocket(ip_socket);
return -1;
}
@@ -268,7 +268,7 @@ int Listener_thread::create_tcp_socket()
{
log_error("Listener_thread::run(): listen(ip socket) failed, %s",
strerror(errno));
- close(ip_socket);
+ closesocket(ip_socket);
return -1;
}