diff options
author | cjihrig <cjihrig@gmail.com> | 2018-04-02 13:33:48 -0400 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2018-04-04 20:02:17 -0400 |
commit | ae2b5bcb7c17a2d2a488f234c736201eed8200db (patch) | |
tree | 0c1ee75429727adc13cd61b63e866f45d9f71fbc /deps/uv/src/unix/posix-poll.c | |
parent | 67cce8d68ad091857b583aa8564d5ac0aaaf2bea (diff) | |
download | android-node-v8-ae2b5bcb7c17a2d2a488f234c736201eed8200db.tar.gz android-node-v8-ae2b5bcb7c17a2d2a488f234c736201eed8200db.tar.bz2 android-node-v8-ae2b5bcb7c17a2d2a488f234c736201eed8200db.zip |
deps: upgrade libuv to 1.20.0
Notable changes:
- uv_fs_copyfile() adds support for copy-on-write behavior.
- uv_relative_path() now uses the long directory name
for handle->dirw.
- File operations on files > 2 GB on 32-bit platforms are
working again.
- uv_fs_fchmod() on Windows works on files with the
Archive flag cleared.
Fixes: https://github.com/nodejs/node/issues/19170
Fixes: https://github.com/nodejs/node/issues/19455
Fixes: https://github.com/nodejs/node/issues/12803
PR-URL: https://github.com/nodejs/node/pull/19758
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'deps/uv/src/unix/posix-poll.c')
-rw-r--r-- | deps/uv/src/unix/posix-poll.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/deps/uv/src/unix/posix-poll.c b/deps/uv/src/unix/posix-poll.c index f356e76c79..f3181f9b72 100644 --- a/deps/uv/src/unix/posix-poll.c +++ b/deps/uv/src/unix/posix-poll.c @@ -107,7 +107,7 @@ static void uv__pollfds_add(uv_loop_t* loop, uv__io_t* w) { static void uv__pollfds_del(uv_loop_t* loop, int fd) { size_t i; assert(!loop->poll_fds_iterating); - for (i = 0; i < loop->poll_fds_used; ++i) { + for (i = 0; i < loop->poll_fds_used;) { if (loop->poll_fds[i].fd == fd) { /* swap to last position and remove */ --loop->poll_fds_used; @@ -115,7 +115,17 @@ static void uv__pollfds_del(uv_loop_t* loop, int fd) { loop->poll_fds[loop->poll_fds_used].fd = -1; loop->poll_fds[loop->poll_fds_used].events = 0; loop->poll_fds[loop->poll_fds_used].revents = 0; - return; + /* This method is called with an fd of -1 to purge the invalidated fds, + * so we may possibly have multiples to remove. + */ + if (-1 != fd) + return; + } else { + /* We must only increment the loop counter when the fds do not match. + * Otherwise, when we are purging an invalidated fd, the value just + * swapped here from the previous end of the array will be skipped. + */ + ++i; } } } |