Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Commit

Permalink
win/process.c: remove unused function duplicate_std_handle
Browse files Browse the repository at this point in the history
  • Loading branch information
piscisaureus committed May 28, 2012
1 parent 4690204 commit 81aff93
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions src/win/process.c
Expand Up @@ -831,37 +831,6 @@ static int uv_create_stdio_pipe_pair(uv_loop_t* loop, uv_pipe_t* server_pipe,
}


static int duplicate_std_handle(uv_loop_t* loop, DWORD id, HANDLE* dup) {
HANDLE handle;
HANDLE current_process = GetCurrentProcess();

handle = GetStdHandle(id);

if (handle == NULL) {
*dup = NULL;
return 0;
} else if (handle == INVALID_HANDLE_VALUE) {
*dup = INVALID_HANDLE_VALUE;
uv__set_sys_error(loop, GetLastError());
return -1;
}

if (!DuplicateHandle(current_process,
handle,
current_process,
dup,
0,
TRUE,
DUPLICATE_SAME_ACCESS)) {
*dup = INVALID_HANDLE_VALUE;
uv__set_sys_error(loop, GetLastError());
return -1;
}

return 0;
}


static int duplicate_handle(uv_loop_t* loop, HANDLE handle, HANDLE* dup) {
HANDLE current_process;

Expand Down

0 comments on commit 81aff93

Please sign in to comment.