Lines Matching defs:handle

29 #include "handle-inl.h"
75 HANDLE handle;
79 handle = GetStdHandle(STD_INPUT_HANDLE);
80 if (handle != NULL && handle != INVALID_HANDLE_VALUE)
81 SetHandleInformation(handle, HANDLE_FLAG_INHERIT, 0);
83 handle = GetStdHandle(STD_OUTPUT_HANDLE);
84 if (handle != NULL && handle != INVALID_HANDLE_VALUE)
85 SetHandleInformation(handle, HANDLE_FLAG_INHERIT, 0);
87 handle = GetStdHandle(STD_ERROR_HANDLE);
88 if (handle != NULL && handle != INVALID_HANDLE_VALUE)
89 SetHandleInformation(handle, HANDLE_FLAG_INHERIT, 0);
98 static int uv__duplicate_handle(uv_loop_t* loop, HANDLE handle, HANDLE* dup) {
103 * happen when fd <= 2 and the process' corresponding stdio handle is set to
107 if (handle == INVALID_HANDLE_VALUE ||
108 handle == NULL ||
109 handle == (HANDLE) -2) {
117 handle,
132 HANDLE handle;
139 handle = uv__get_osfhandle(fd);
140 return uv__duplicate_handle(loop, handle, dup);
146 HANDLE handle;
153 handle = CreateFileW(L"NUL",
160 if (handle == INVALID_HANDLE_VALUE) {
164 *handle_ptr = handle;
238 * an uninitialized, but not connected pipe handle. */
259 /* Make an inheritable duplicate of the handle. */
306 /* Use an existing stream as the stdio handle for the child. */
311 /* Leech the handle out of the stream. */
313 stream_handle = ((uv_tty_t*) stream)->handle;
317 stream_handle = ((uv_pipe_t*) stream)->handle;
326 /* The handle is already closed, or not yet created, or the stream
332 /* Make an inheritable copy of the handle. */
362 HANDLE handle = CHILD_STDIO_HANDLE(buffer, i);
363 if (handle != INVALID_HANDLE_VALUE) {
364 CloseHandle(handle);
377 HANDLE handle = CHILD_STDIO_HANDLE(buffer, i);
378 if (handle != INVALID_HANDLE_VALUE) {
379 SetHandleInformation(handle, HANDLE_FLAG_INHERIT, 0);