From 0ec191eb0fd161e3bbd9e92270282d3d81e2cf11 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Thu, 20 Aug 2020 23:49:00 +0200 Subject: [PATCH] kernelbase: Add ClosePseudoConsole implementation. Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- dlls/kernelbase/console.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/dlls/kernelbase/console.c b/dlls/kernelbase/console.c index cb85061fc95..42dc971227d 100644 --- a/dlls/kernelbase/console.c +++ b/dlls/kernelbase/console.c @@ -1704,7 +1704,18 @@ HRESULT WINAPI CreatePseudoConsole( COORD size, HANDLE input, HANDLE output, DWO */ void WINAPI ClosePseudoConsole( HPCON handle ) { - FIXME( "%p\n", handle ); + struct pseudo_console *pseudo_console = handle; + + TRACE( "%p\n", handle ); + + if (!pseudo_console) return; + if (pseudo_console->signal) CloseHandle( pseudo_console->signal ); + if (pseudo_console->process) + { + WaitForSingleObject( pseudo_console->process, INFINITE ); + CloseHandle( pseudo_console->process ); + } + if (pseudo_console->reference) CloseHandle( pseudo_console->reference ); } /******************************************************************************