diff --git a/AUTHORS b/AUTHORS index 6633f065..64baf7c6 100644 --- a/AUTHORS +++ b/AUTHORS @@ -111,4 +111,6 @@ Yazhong Liu Sam Roberts River Tarnell Nathan Sweet +Alex Crichton +Luca Bruno Trevor Norris diff --git a/ChangeLog b/ChangeLog index 9a726db9..a18181dd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,15 @@ Changes since version 0.11.18: * linux: fix C99/C++ comment (Fedor Indutny) +2014.01.30, Version 0.10.24 (Stable), aecd296b6bce9b40f06a61c5c94e43d45ac7308a + +Changes since version 0.10.23: + +* linux: move sscanf() out of the assert() (Trevor Norris) + +* linux: fix C99/C++ comment (Fedor Indutny) + + 2014.01.23, Version 0.11.18 (Unstable), d47962e9d93d4a55a9984623feaf546406c9cdbb Changes since version 0.11.17: diff --git a/src/unix/stream.c b/src/unix/stream.c index 9f5d40cf..75271713 100644 --- a/src/unix/stream.c +++ b/src/unix/stream.c @@ -301,6 +301,7 @@ int uv__stream_try_select(uv_stream_t* stream, int* fd) { int err; int ret; int kq; + int old_fd; kq = kqueue(); if (kq == -1) { @@ -353,16 +354,20 @@ int uv__stream_try_select(uv_stream_t* stream, int* fd) { s->fake_fd = fds[0]; s->int_fd = fds[1]; - if (uv_thread_create(&s->thread, uv__stream_osx_select, stream)) - goto fatal4; - + old_fd = *fd; s->stream = stream; stream->select = s; *fd = s->fake_fd; + if (uv_thread_create(&s->thread, uv__stream_osx_select, stream)) + goto fatal4; + return 0; fatal4: + s->stream = NULL; + stream->select = NULL; + *fd = old_fd; uv__close(s->fake_fd); uv__close(s->int_fd); s->fake_fd = -1;