diff --git a/client/mysqltest.cc b/client/mysqltest.cc index 9a1dfaa18ef..3652d1a40e2 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -5086,12 +5086,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); diff --git a/include/violite.h b/include/violite.h index ea7e3d7897c..da58de4373c 100644 --- a/include/violite.h +++ b/include/violite.h @@ -184,7 +184,7 @@ void vio_end(void); /* shutdown(2) flags */ #ifndef SHUT_RD -#define SHUT_RD SD_BOTH +#define SHUT_RD SD_RECEIVE #endif /*