summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-01-25 22:58:57 +0100
committerSergei Golubchik <serg@mariadb.org>2016-01-25 22:58:57 +0100
commitf4faac4d6ad31acc96b9edf8c322f3031123dfe0 (patch)
tree8c7b112e3464149928db6b0bb7c7ddd9067f69c9 /client
parent2ff65ba53190ad897fc41f546fc4a7bdc80d9054 (diff)
parent666b9663f94c2a4f39d331b28fabd09f2dc43bf2 (diff)
downloadmariadb-git-f4faac4d6ad31acc96b9edf8c322f3031123dfe0.tar.gz
Merge branch '10.0' into 10.1
Diffstat (limited to 'client')
-rw-r--r--client/mysqltest.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index 3bbfc70eaed..860e442a290 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -4977,12 +4977,13 @@ static int my_kill(int pid, int sig)
{
#ifdef __WIN__
HANDLE proc;
- if ((proc= OpenProcess(PROCESS_TERMINATE, FALSE, pid)) == NULL)
+ if ((proc= OpenProcess(SYNCHRONIZE|PROCESS_TERMINATE, FALSE, pid)) == NULL)
return -1;
if (sig == 0)
{
+ DWORD wait_result= WaitForSingleObject(proc, 0);
CloseHandle(proc);
- return 0;
+ return wait_result == WAIT_OBJECT_0?-1:0;
}
(void)TerminateProcess(proc, 201);
CloseHandle(proc);