win: avoid leaking pipe handles to child processes
Refs: https://github.com/joyent/libuv/issues/1313 PR-URL: https://github.com/libuv/libuv/pull/1321 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
This commit is contained in:
parent
4e61013880
commit
7350644939
@ -960,7 +960,7 @@ static DWORD WINAPI uv_pipe_zero_readfile_thread_proc(void* parameter) {
|
||||
uv_mutex_lock(m); /* mutex controls *setting* of readfile_thread */
|
||||
if (DuplicateHandle(GetCurrentProcess(), GetCurrentThread(),
|
||||
GetCurrentProcess(), &hThread,
|
||||
0, TRUE, DUPLICATE_SAME_ACCESS)) {
|
||||
0, FALSE, DUPLICATE_SAME_ACCESS)) {
|
||||
handle->pipe.conn.readfile_thread = hThread;
|
||||
} else {
|
||||
hThread = NULL;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user