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.
This commit is contained in:
Ben Noordhuis 2011-08-01 18:01:54 +02:00
parent e9bee5131a
commit a3852a7d73

View File

@ -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);