Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

win/process.c: remove unused function duplicate_std_handle

  • Loading branch information...
piscisaureus committed May 28, 2012
1 parent 4690204 commit 81aff9363357b4174a8528bc259d3d4ca277c7e7
Showing with 0 additions and 31 deletions.
  1. +0 −31 src/win/process.c
@@ -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;

0 comments on commit 81aff93

Please sign in to comment.
You can’t perform that action at this time.