Module: tools Branch: master Commit: f8b3f02f851e8022c1fbba9fee999b2d6c080c77 URL: https://source.winehq.org/git/tools.git/?a=commit;h=f8b3f02f851e8022c1fbba9f... Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Thu Oct 31 17:02:57 2019 +0100 testbot/testagentd: Reset the console handle after closing it. GetStdHandle() still returns the pseudo handles for the closed console except they obviously don't work. So reset them to avoid confusion. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- testbot/src/testagentd/platform_windows.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/testbot/src/testagentd/platform_windows.c b/testbot/src/testagentd/platform_windows.c index b3db635..ea6f03f 100644 --- a/testbot/src/testagentd/platform_windows.c +++ b/testbot/src/testagentd/platform_windows.c @@ -689,6 +689,9 @@ void ta_freeaddrinfo(struct addrinfo *addresses) void platform_detach_console(void) { FreeConsole(); + SetStdHandle(STD_INPUT_HANDLE, INVALID_HANDLE_VALUE); + SetStdHandle(STD_OUTPUT_HANDLE, INVALID_HANDLE_VALUE); + SetStdHandle(STD_ERROR_HANDLE, INVALID_HANDLE_VALUE); } int platform_init(void)