[0.4.8] cherry-pick [WINSRV] Don't try to remove messages from the queue without dispatching them. CORE-13734

To prevent the visible symptom
'sporadic NTOSKRNL work queue deadlock when exiting command.com'

This partially reverts r58615 / 01729482ae.

(cherry picked from commit 3159de5573)
cherry-picked by Joachim Henze
This commit is contained in:
Thomas Faber 2018-03-07 13:03:39 +01:00 committed by Joachim Henze
parent 4a16f8a721
commit 795c7f70cc

View file

@ -229,13 +229,10 @@ GuiConsoleInputThread(PVOID Param)
* that the window that we want to destroy doesn't exist yet.
* So first empty the message queue.
*/
/*
while (PeekMessageW(&TempMsg, NULL, 0, 0, PM_REMOVE))
{
TranslateMessage(&TempMsg);
DispatchMessageW(&TempMsg);
}*/
while (PeekMessageW(&TempMsg, NULL, 0, 0, PM_REMOVE)) ;
}
if (GuiData->hWindow == NULL) continue;