Revert "win, test: fix double close in test runner"
Causes test output to be lost.
This reverts commit bded0fa4f0.
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 <cjihrig@gmail.com>
This commit is contained in:
parent
dff7ebe4f0
commit
eb4a37c8f6
@ -212,18 +212,8 @@ int process_copy_output(process_info_t* p, FILE* stream) {
|
|||||||
char buf[1024];
|
char buf[1024];
|
||||||
int fd, r;
|
int fd, r;
|
||||||
FILE* f;
|
FILE* f;
|
||||||
HANDLE stdio_out_copy;
|
|
||||||
|
|
||||||
if (!DuplicateHandle(GetCurrentProcess(),
|
fd = _open_osfhandle((intptr_t)p->stdio_out, _O_RDONLY | _O_TEXT);
|
||||||
p->stdio_out,
|
|
||||||
GetCurrentProcess(),
|
|
||||||
&stdio_out_copy,
|
|
||||||
0,
|
|
||||||
FALSE,
|
|
||||||
0))
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
fd = _open_osfhandle((intptr_t)stdio_out_copy, _O_RDONLY | _O_TEXT);
|
|
||||||
if (fd == -1)
|
if (fd == -1)
|
||||||
return -1;
|
return -1;
|
||||||
f = _fdopen(fd, "rt");
|
f = _fdopen(fd, "rt");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user