From a3852a7d73cee5709e727a053923f731398119d7 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Mon, 1 Aug 2011 18:01:54 +0200 Subject: [PATCH] uv-unix: set stream->accepted_fd=-1 in uv_pipe_init() stream->accepted_fd was zeroed in uv_pipe_init() and that made uv__finish_close() close the stdin file descriptor. Not good. --- src/uv-unix.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/uv-unix.c b/src/uv-unix.c index 33903e01..2dde2c3c 100644 --- a/src/uv-unix.c +++ b/src/uv-unix.c @@ -1838,6 +1838,7 @@ int uv_pipe_init(uv_pipe_t* handle) { ev_init(&handle->read_watcher, uv__stream_io); handle->write_watcher.data = handle; handle->read_watcher.data = handle; + handle->accepted_fd = -1; handle->fd = -1; ngx_queue_init(&handle->write_completed_queue);