Francois Gouget : testbot/testagentd: Reset the console handle after closing it.

Alexandre Julliard julliard at winehq.org
Thu Oct 31 16:46:47 CDT 2019


Module: tools
Branch: master
Commit: f8b3f02f851e8022c1fbba9fee999b2d6c080c77
URL:    https://source.winehq.org/git/tools.git/?a=commit;h=f8b3f02f851e8022c1fbba9fee999b2d6c080c77

Author: Francois Gouget <fgouget at 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 at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at 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)




More information about the wine-cvs mailing list