Skip to content

Commit 4847627

Browse files
committed
uv: upgrade to 0.10.11
1 parent 49d9ad9 commit 4847627

4 files changed

Lines changed: 38 additions & 30 deletions

File tree

deps/uv/ChangeLog

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
1-
2013.06.05, Version 0.10.10 (Stable)
1+
2013.06.13, Version 0.10.11 (Stable)
2+
3+
Changes since version 0.10.10:
4+
5+
* unix: unconditionally stop handle on close (Ben Noordhuis)
6+
7+
* freebsd: don't enable dtrace if it's not available (Brian White)
8+
9+
* build: make HAVE_DTRACE=0 should disable dtrace (Timothy J. Fontaine)
10+
11+
* unix: remove overzealous assert (Ben Noordhuis)
12+
13+
* unix: clear UV_STREAM_SHUTTING after shutdown() (Ben Noordhuis)
14+
15+
* unix: fix busy loop, write if POLLERR or POLLHUP (Ben Noordhuis)
16+
17+
18+
2013.06.05, Version 0.10.10 (Stable), 0d95a88bd35fce93863c57a460be613aea34d2c5
219

320
Changes since version 0.10.9:
421

deps/uv/config-unix.mk

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ RUNNER_SRC=test/runner-unix.c
3131
RUNNER_CFLAGS=$(CFLAGS) -I$(SRCDIR)/test
3232
RUNNER_LDFLAGS=-L"$(CURDIR)" -luv
3333

34-
HAVE_DTRACE=
3534
DTRACE_OBJS=
3635
DTRACE_HEADER=
3736

@@ -60,14 +59,16 @@ OBJS += src/inet.o
6059
OBJS += src/version.o
6160

6261
ifeq (sunos,$(PLATFORM))
63-
HAVE_DTRACE=1
62+
HAVE_DTRACE ?= 1
6463
CPPFLAGS += -D__EXTENSIONS__ -D_XOPEN_SOURCE=500
6564
LDFLAGS+=-lkstat -lnsl -lsendfile -lsocket
6665
# Library dependencies are not transitive.
6766
OBJS += src/unix/sunos.o
67+
ifeq (1, $(HAVE_DTRACE))
6868
OBJS += src/unix/dtrace.o
6969
DTRACE_OBJS += src/unix/core.o
7070
endif
71+
endif
7172

7273
ifeq (aix,$(PLATFORM))
7374
CPPFLAGS += -D_ALL_SOURCE -D_XOPEN_SOURCE=500
@@ -76,7 +77,7 @@ OBJS += src/unix/aix.o
7677
endif
7778

7879
ifeq (darwin,$(PLATFORM))
79-
HAVE_DTRACE=1
80+
HAVE_DTRACE ?= 1
8081
# dtrace(1) probes contain dollar signs on OS X. Mute the warnings they
8182
# generate but only when CC=clang, -Wno-dollar-in-identifier-extension
8283
# is a clang extension.
@@ -106,7 +107,9 @@ OBJS += src/unix/linux-core.o \
106107
endif
107108

108109
ifeq (freebsd,$(PLATFORM))
109-
HAVE_DTRACE=1
110+
ifeq ($(shell dtrace -l 1>&2 2>/dev/null; echo $$?),0)
111+
HAVE_DTRACE ?= 1
112+
endif
110113
LDFLAGS+=-lkvm
111114
OBJS += src/unix/freebsd.o
112115
OBJS += src/unix/kqueue.o

deps/uv/src/unix/stream.c

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,7 @@ int uv_listen(uv_stream_t* stream, int backlog, uv_connection_cb cb) {
630630

631631
static void uv__drain(uv_stream_t* stream) {
632632
uv_shutdown_t* req;
633+
int status;
633634

634635
assert(ngx_queue_empty(&stream->write_queue));
635636
uv__io_stop(stream->loop, &stream->io_watcher, UV__POLLOUT);
@@ -642,21 +643,17 @@ static void uv__drain(uv_stream_t* stream) {
642643

643644
req = stream->shutdown_req;
644645
stream->shutdown_req = NULL;
646+
stream->flags &= ~UV_STREAM_SHUTTING;
645647
uv__req_unregister(stream->loop, req);
646648

647-
if (shutdown(uv__stream_fd(stream), SHUT_WR)) {
648-
/* Error. Report it. User should call uv_close(). */
649+
status = shutdown(uv__stream_fd(stream), SHUT_WR);
650+
if (status)
649651
uv__set_sys_error(stream->loop, errno);
650-
if (req->cb) {
651-
req->cb(req, -1);
652-
}
653-
} else {
654-
uv__set_sys_error(stream->loop, 0);
655-
((uv_handle_t*) stream)->flags |= UV_STREAM_SHUT;
656-
if (req->cb) {
657-
req->cb(req, 0);
658-
}
659-
}
652+
else
653+
stream->flags |= UV_STREAM_SHUT;
654+
655+
if (req->cb != NULL)
656+
req->cb(req, status);
660657
}
661658
}
662659

@@ -1121,7 +1118,7 @@ static void uv__stream_io(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
11211118
return; /* read_cb closed stream. */
11221119
}
11231120

1124-
if (events & UV__POLLOUT) {
1121+
if (events & (UV__POLLOUT | UV__POLLERR | UV__POLLHUP)) {
11251122
assert(uv__stream_fd(stream) >= 0);
11261123
uv__write(stream);
11271124
uv__write_callbacks(stream);
@@ -1318,16 +1315,6 @@ int uv_read2_start(uv_stream_t* stream, uv_alloc_cb alloc_cb,
13181315

13191316

13201317
int uv_read_stop(uv_stream_t* stream) {
1321-
/* Sanity check. We're going to stop the handle unless it's primed for
1322-
* writing but that means there should be some kind of write action in
1323-
* progress.
1324-
*/
1325-
assert(!uv__io_active(&stream->io_watcher, UV__POLLOUT) ||
1326-
!ngx_queue_empty(&stream->write_completed_queue) ||
1327-
!ngx_queue_empty(&stream->write_queue) ||
1328-
stream->shutdown_req != NULL ||
1329-
stream->connect_req != NULL);
1330-
13311318
stream->flags &= ~UV_STREAM_READING;
13321319
uv__io_stop(stream->loop, &stream->io_watcher, UV__POLLIN);
13331320
if (!uv__io_active(&stream->io_watcher, UV__POLLOUT))
@@ -1395,8 +1382,9 @@ void uv__stream_close(uv_stream_t* handle) {
13951382
}
13961383
#endif /* defined(__APPLE__) */
13971384

1398-
uv_read_stop(handle);
13991385
uv__io_close(handle->loop, &handle->io_watcher);
1386+
uv_read_stop(handle);
1387+
uv__handle_stop(handle);
14001388

14011389
close(handle->io_watcher.fd);
14021390
handle->io_watcher.fd = -1;

deps/uv/src/version.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
#define UV_VERSION_MAJOR 0
3636
#define UV_VERSION_MINOR 10
37-
#define UV_VERSION_PATCH 10
37+
#define UV_VERSION_PATCH 11
3838
#define UV_VERSION_IS_RELEASE 1
3939

4040

0 commit comments

Comments
 (0)