From 795c7f70cc6cc6a06b30f1160855c117522e03d2 Mon Sep 17 00:00:00 2001 From: Thomas Faber Date: Wed, 7 Mar 2018 13:03:39 +0100 Subject: [PATCH] [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 3159de5573e3836e31241cc87724f1d3d1f8daf0) cherry-picked by Joachim Henze --- win32ss/user/winsrv/consrv/frontends/gui/guiterm.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c b/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c index c3e14d30990..e371ea484a2 100644 --- a/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c +++ b/win32ss/user/winsrv/consrv/frontends/gui/guiterm.c @@ -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;