summaryrefslogtreecommitdiff
path: root/sql/nt_servc.cc
diff options
context:
space:
mode:
authorMiguel@light.local <>2001-09-25 01:13:19 -0300
committerMiguel@light.local <>2001-09-25 01:13:19 -0300
commit3b774da463986509975aacb933acd7f4fb31a774 (patch)
treeb86b189a0d333cd85fde6acea849ee208fa7d26b /sql/nt_servc.cc
parentdf1045ee3c5c25eb62fb1cb8a065fa1bf0d8b902 (diff)
downloadmariadb-git-3b774da463986509975aacb933acd7f4fb31a774.tar.gz
Changes on NT service for a more faster stop of the service on Win2k
and free the main thread of the service.
Diffstat (limited to 'sql/nt_servc.cc')
-rw-r--r--sql/nt_servc.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/nt_servc.cc b/sql/nt_servc.cc
index 5884300fe95..3a36f5740a9 100644
--- a/sql/nt_servc.cc
+++ b/sql/nt_servc.cc
@@ -246,7 +246,8 @@ void NTService::ServiceMain(DWORD argc, LPTSTR *argv)
WaitForSingleObject (pService->hExitEvent, INFINITE);
// wait for thread to exit
- WaitForSingleObject (pService->hThreadHandle, 30000);
+ if (WaitForSingleObject (pService->hThreadHandle, 1000)==WAIT_TIMEOUT)
+ CloseHandle(pService->hThreadHandle);
pService->Exit(0);
}