[PATCH 2/3] testbot/testagentd: Reset the console handle after closing it.
Francois Gouget
fgouget at codeweavers.com
Thu Oct 31 11:02:57 CDT 2019
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>
---
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 b3db635e1..ea6f03f80 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)
--
2.20.1
More information about the wine-devel
mailing list