From eb4a37c8f640bdc6a0c09a3bd9c11f3669ff316f Mon Sep 17 00:00:00 2001 From: Bartosz Sosnowski Date: Wed, 6 Sep 2017 15:01:41 +0200 Subject: [PATCH] Revert "win, test: fix double close in test runner" Causes test output to be lost. This reverts commit bded0fa4f0243ea86366c4f6d974915277d7ca7f. Refs: https://github.com/libuv/libuv/issues/1426 Refs: https://github.com/libuv/libuv/pull/1450 PR-URL: https://github.com/libuv/libuv/pull/1523 Reviewed-By: Colin Ihrig --- test/runner-win.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/test/runner-win.c b/test/runner-win.c index 49c9a90cf..0f1b56e77 100644 --- a/test/runner-win.c +++ b/test/runner-win.c @@ -212,18 +212,8 @@ int process_copy_output(process_info_t* p, FILE* stream) { char buf[1024]; int fd, r; FILE* f; - HANDLE stdio_out_copy; - if (!DuplicateHandle(GetCurrentProcess(), - p->stdio_out, - GetCurrentProcess(), - &stdio_out_copy, - 0, - FALSE, - 0)) - return -1; - - fd = _open_osfhandle((intptr_t)stdio_out_copy, _O_RDONLY | _O_TEXT); + fd = _open_osfhandle((intptr_t)p->stdio_out, _O_RDONLY | _O_TEXT); if (fd == -1) return -1; f = _fdopen(fd, "rt");