mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
- Terminate the wait thread if the handle was from a console.
svn path=/trunk/; revision=11149
This commit is contained in:
parent
c8641fc2a3
commit
d2a8a1bc51
1 changed files with 8 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: wait.c,v 1.29 2004/07/18 23:52:31 navaraf Exp $
|
/* $Id: wait.c,v 1.30 2004/10/02 10:19:38 hbirr Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
|
@ -105,6 +105,7 @@ WaitForSingleObjectEx(HANDLE hHandle,
|
||||||
SetLastErrorByStatus (Status);
|
SetLastErrorByStatus (Status);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
CloseWaitHandle = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,7 +124,10 @@ WaitForSingleObjectEx(HANDLE hHandle,
|
||||||
TimePtr);
|
TimePtr);
|
||||||
|
|
||||||
if (CloseWaitHandle)
|
if (CloseWaitHandle)
|
||||||
|
{
|
||||||
|
TerminateThread(hHandle, 0);
|
||||||
NtClose(hHandle);
|
NtClose(hHandle);
|
||||||
|
}
|
||||||
|
|
||||||
if (HIWORD(Status))
|
if (HIWORD(Status))
|
||||||
{
|
{
|
||||||
|
@ -245,7 +249,10 @@ WaitForMultipleObjectsEx(DWORD nCount,
|
||||||
|
|
||||||
for (i = 0; i < nCount; i++)
|
for (i = 0; i < nCount; i++)
|
||||||
if (FreeThisHandle[i])
|
if (FreeThisHandle[i])
|
||||||
|
{
|
||||||
|
TerminateThread(HandleBuffer[i], 0);
|
||||||
NtClose(HandleBuffer[i]);
|
NtClose(HandleBuffer[i]);
|
||||||
|
}
|
||||||
|
|
||||||
RtlFreeHeap(RtlGetProcessHeap(), 0, HandleBuffer);
|
RtlFreeHeap(RtlGetProcessHeap(), 0, HandleBuffer);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue