summaryrefslogtreecommitdiff
path: root/deps/uv
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2013-06-12 22:10:39 +0200
committerBen Noordhuis <info@bnoordhuis.nl>2013-06-12 22:10:39 +0200
commit48476273eb1a5868c2cccd7afdb9338fa52efccc (patch)
tree08a53cc4e3635b8b9781ba5c94bd0c136f44f14d /deps/uv
parent49d9ad9d81e2db72fecc4d0c3c2d3a205dde8bee (diff)
downloadandroid-node-v8-48476273eb1a5868c2cccd7afdb9338fa52efccc.tar.gz
android-node-v8-48476273eb1a5868c2cccd7afdb9338fa52efccc.tar.bz2
android-node-v8-48476273eb1a5868c2cccd7afdb9338fa52efccc.zip
uv: upgrade to 0.10.11
Diffstat (limited to 'deps/uv')
-rw-r--r--deps/uv/ChangeLog19
-rw-r--r--deps/uv/config-unix.mk11
-rw-r--r--deps/uv/src/unix/stream.c36
-rw-r--r--deps/uv/src/version.c2
4 files changed, 38 insertions, 30 deletions
diff --git a/deps/uv/ChangeLog b/deps/uv/ChangeLog
index 058b70a07e..f62839e39e 100644
--- a/deps/uv/ChangeLog
+++ b/deps/uv/ChangeLog
@@ -1,4 +1,21 @@
-2013.06.05, Version 0.10.10 (Stable)
+2013.06.13, Version 0.10.11 (Stable)
+
+Changes since version 0.10.10:
+
+* unix: unconditionally stop handle on close (Ben Noordhuis)
+
+* freebsd: don't enable dtrace if it's not available (Brian White)
+
+* build: make HAVE_DTRACE=0 should disable dtrace (Timothy J. Fontaine)
+
+* unix: remove overzealous assert (Ben Noordhuis)
+
+* unix: clear UV_STREAM_SHUTTING after shutdown() (Ben Noordhuis)
+
+* unix: fix busy loop, write if POLLERR or POLLHUP (Ben Noordhuis)
+
+
+2013.06.05, Version 0.10.10 (Stable), 0d95a88bd35fce93863c57a460be613aea34d2c5
Changes since version 0.10.9:
diff --git a/deps/uv/config-unix.mk b/deps/uv/config-unix.mk
index 347d9d7764..9088730592 100644
--- a/deps/uv/config-unix.mk
+++ b/deps/uv/config-unix.mk
@@ -31,7 +31,6 @@ RUNNER_SRC=test/runner-unix.c
RUNNER_CFLAGS=$(CFLAGS) -I$(SRCDIR)/test
RUNNER_LDFLAGS=-L"$(CURDIR)" -luv
-HAVE_DTRACE=
DTRACE_OBJS=
DTRACE_HEADER=
@@ -60,14 +59,16 @@ OBJS += src/inet.o
OBJS += src/version.o
ifeq (sunos,$(PLATFORM))
-HAVE_DTRACE=1
+HAVE_DTRACE ?= 1
CPPFLAGS += -D__EXTENSIONS__ -D_XOPEN_SOURCE=500
LDFLAGS+=-lkstat -lnsl -lsendfile -lsocket
# Library dependencies are not transitive.
OBJS += src/unix/sunos.o
+ifeq (1, $(HAVE_DTRACE))
OBJS += src/unix/dtrace.o
DTRACE_OBJS += src/unix/core.o
endif
+endif
ifeq (aix,$(PLATFORM))
CPPFLAGS += -D_ALL_SOURCE -D_XOPEN_SOURCE=500
@@ -76,7 +77,7 @@ OBJS += src/unix/aix.o
endif
ifeq (darwin,$(PLATFORM))
-HAVE_DTRACE=1
+HAVE_DTRACE ?= 1
# dtrace(1) probes contain dollar signs on OS X. Mute the warnings they
# generate but only when CC=clang, -Wno-dollar-in-identifier-extension
# is a clang extension.
@@ -106,7 +107,9 @@ OBJS += src/unix/linux-core.o \
endif
ifeq (freebsd,$(PLATFORM))
-HAVE_DTRACE=1
+ifeq ($(shell dtrace -l 1>&2 2>/dev/null; echo $$?),0)
+HAVE_DTRACE ?= 1
+endif
LDFLAGS+=-lkvm
OBJS += src/unix/freebsd.o
OBJS += src/unix/kqueue.o
diff --git a/deps/uv/src/unix/stream.c b/deps/uv/src/unix/stream.c
index 52972d9cef..c9df979772 100644
--- a/deps/uv/src/unix/stream.c
+++ b/deps/uv/src/unix/stream.c
@@ -630,6 +630,7 @@ int uv_listen(uv_stream_t* stream, int backlog, uv_connection_cb cb) {
static void uv__drain(uv_stream_t* stream) {
uv_shutdown_t* req;
+ int status;
assert(ngx_queue_empty(&stream->write_queue));
uv__io_stop(stream->loop, &stream->io_watcher, UV__POLLOUT);
@@ -642,21 +643,17 @@ static void uv__drain(uv_stream_t* stream) {
req = stream->shutdown_req;
stream->shutdown_req = NULL;
+ stream->flags &= ~UV_STREAM_SHUTTING;
uv__req_unregister(stream->loop, req);
- if (shutdown(uv__stream_fd(stream), SHUT_WR)) {
- /* Error. Report it. User should call uv_close(). */
+ status = shutdown(uv__stream_fd(stream), SHUT_WR);
+ if (status)
uv__set_sys_error(stream->loop, errno);
- if (req->cb) {
- req->cb(req, -1);
- }
- } else {
- uv__set_sys_error(stream->loop, 0);
- ((uv_handle_t*) stream)->flags |= UV_STREAM_SHUT;
- if (req->cb) {
- req->cb(req, 0);
- }
- }
+ else
+ stream->flags |= UV_STREAM_SHUT;
+
+ if (req->cb != NULL)
+ req->cb(req, status);
}
}
@@ -1121,7 +1118,7 @@ static void uv__stream_io(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
return; /* read_cb closed stream. */
}
- if (events & UV__POLLOUT) {
+ if (events & (UV__POLLOUT | UV__POLLERR | UV__POLLHUP)) {
assert(uv__stream_fd(stream) >= 0);
uv__write(stream);
uv__write_callbacks(stream);
@@ -1318,16 +1315,6 @@ int uv_read2_start(uv_stream_t* stream, uv_alloc_cb alloc_cb,
int uv_read_stop(uv_stream_t* stream) {
- /* Sanity check. We're going to stop the handle unless it's primed for
- * writing but that means there should be some kind of write action in
- * progress.
- */
- assert(!uv__io_active(&stream->io_watcher, UV__POLLOUT) ||
- !ngx_queue_empty(&stream->write_completed_queue) ||
- !ngx_queue_empty(&stream->write_queue) ||
- stream->shutdown_req != NULL ||
- stream->connect_req != NULL);
-
stream->flags &= ~UV_STREAM_READING;
uv__io_stop(stream->loop, &stream->io_watcher, UV__POLLIN);
if (!uv__io_active(&stream->io_watcher, UV__POLLOUT))
@@ -1395,8 +1382,9 @@ void uv__stream_close(uv_stream_t* handle) {
}
#endif /* defined(__APPLE__) */
- uv_read_stop(handle);
uv__io_close(handle->loop, &handle->io_watcher);
+ uv_read_stop(handle);
+ uv__handle_stop(handle);
close(handle->io_watcher.fd);
handle->io_watcher.fd = -1;
diff --git a/deps/uv/src/version.c b/deps/uv/src/version.c
index 38cd35cc9b..248ff28452 100644
--- a/deps/uv/src/version.c
+++ b/deps/uv/src/version.c
@@ -34,7 +34,7 @@
#define UV_VERSION_MAJOR 0
#define UV_VERSION_MINOR 10
-#define UV_VERSION_PATCH 10
+#define UV_VERSION_PATCH 11
#define UV_VERSION_IS_RELEASE 1