Commit Graph

3863 Commits

Author SHA1 Message Date
Sakthipriyan Vairamani (thefourtheye)
8ea2ee4e26
unix: remove unused variables
PR-URL: https://github.com/libuv/libuv/pull/1578
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-10-02 08:52:16 -04:00
Carlo Marcelo Arenas Belón
e9d2b5824f
win: remove unused variables
This commit removes unused variables left over from
6ad1e81547.

Refs: https://github.com/libuv/libuv/pull/1408
PR-URL: https://github.com/libuv/libuv/pull/1571
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-10-02 08:46:56 -04:00
John Barboza
9991bb7c62 build: avoid -fstrict-aliasing compile option
Libuv is not aliasing-safe if you consider aliasing to be nominal
rather than structural and it's not as if it makes much of a
difference in the quality of the generated code, at least for libuv.

PR-URL: https://github.com/libuv/libuv/pull/1457
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-09-30 14:21:11 +02:00
Carlo Marcelo Arenas Belón
939a8f1a5b
windows: fix compilation warnings
Refs: https://github.com/libuv/libuv/pull/1530
PR-URL: https://github.com/libuv/libuv/pull/1542
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-09-29 09:06:35 -04:00
Sakthipriyan Vairamani
c1ca7f078d test: sort the tests alphabetically
As it is, when the tests run, there is no indicator as to how long the
tests will run, how many more tests are pending.

PR-URL: https://github.com/libuv/libuv/pull/1543
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-09-27 23:12:01 +02:00
John Barboza
8d3645a19b zos: fix readlink for mounts with system variables
On z/OS, fs mounts can have variables starting with '$'. The problem is
that following symlinks that contain these variables can lead to a loop
because readlink($SYSVAR) will return $SYSVAR.  To work around this, we
must resolve the $SYSVAR to an actual path using realpath.

More information about z/OS symlink resolution is available here:

https://www.ibm.com/support/knowledgecenter/SSLTBW_2.1.0/
com.ibm.zos.v2r1.bpxb100/sym.htm

PR-URL: https://github.com/libuv/libuv/pull/1472
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-09-27 22:07:26 +02:00
Kamil Rytarowski
3877a90e69 netbsd: implement uv__tty_is_slave()
NetBSD as an extension returns with ptsname(3) and ptsname_r(3) the
slave device name for both descriptors, the master one and slave one.

Workaround this problem and verify the device major and compare it with
the pts driver. Major numbers for the master and the slave TTY are
machine-dependent. On amd64 they are respectively 6 (ptc) and 5 (pts).

PR-URL: https://github.com/libuv/libuv/pull/1533
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-09-26 19:49:40 +02:00
Zheng, Lei
11a7aa4a09 android: fix getifaddrs()
The most critical bug is using IFLA_RTA instead of IFA_RTA on address
message. This causes android to not return any ipv6 address.

PR-URL: https://github.com/libuv/libuv/pull/1561
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-09-26 19:39:32 +02:00
John Barboza
eb1fe77f66 zos: change platform name to match python
The latest python on z/OS (2.7.13) was changed to update sys.platform to
return "zos" instead of "os390". So a change has been submitted to the
official gyp repository here.

PR-URL: https://github.com/libuv/libuv/pull/1557
Refs: https://chromium-review.googlesource.com/c/external/gyp/+/679077
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-09-26 19:35:08 +02:00
John Barboza
24334e0739 zos: lock protect global epoll list in epoll_ctl
This will eliminate a race condition that occurs between
epoll_close_fd, epoll_ctl and epoll_create in the
signal_multiple_loops test.

PR-URL: https://github.com/libuv/libuv/pull/1560
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-09-26 15:33:01 +02:00
cjihrig
b21c1f900c
win: let UV_PROCESS_WINDOWS_HIDE hide consoles
The existing UV_PROCESS_WINDOWS_HIDE flag only applies to
executables linked to the WINDOWS subsystem. This allows
CONSOLE subsystem applications to pop up a console
window. This commit sets the CREATE_NO_WINDOW process
flag when UV_PROCESS_WINDOWS_HIDE to prevent this behavior.

Refs: https://github.com/nodejs/node/pull/15380
Refs: https://github.com/joyent/libuv/pull/627
Refs: https://github.com/libuv/libuv/issues/965
PR-URL: https://github.com/libuv/libuv/pull/1558
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
2017-09-25 19:55:59 -04:00
Refael Ackermann
66b8b2f76d
win,build: bump vswhere_usability_wrapper to 2.0.0
PR-URL: https://github.com/libuv/libuv/pull/1479
Fixes: https://github.com/nodejs/libuv/issues/1476
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
2017-09-25 17:31:49 -04:00
John Barboza
bf144cee42 test: clean up semaphore after use
On systems that use System V semaphores, it is necessary to destroy
semaphores to free up system resources when the process finishes
execution.

PR-URL: https://github.com/libuv/libuv/pull/1559
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-09-25 22:43:44 +02:00
Kamil Rytarowski
5fa0f0b6e1 netbsd: correct uv_exepath() on NetBSD
Setup proper sysctl(2) arguments in order to retrieve the executable
name.

Use an intermediate buffer beacause if it is too short, the sysctl(2)
call will return error. With this intermediate buffer populate the outer
one.

Note issue with too long file names on NetBSD-8(beta), this is caused by
the current implementation of vnode to path translator in the kernel. It
does not cache longer file names than 31 character ones.

PR-URL: https://github.com/libuv/libuv/pull/1532
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-09-25 22:37:36 +02:00
Ben Noordhuis
0afccdb0a4 linux: increase thread stack size with musl libc
musl has tiny default thread stack sizes compared to glibc (80 kB vs.
2048 kB or more) so set an explicit stack size to harmonize between
different libcs.

Fixes: https://github.com/libuv/libuv/issues/1507
PR-URL: https://github.com/libuv/libuv/pull/1526
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-09-25 22:22:30 +02:00
Kamil Rytarowski
c0504885ea
unix: add NetBSD support in core.c
NetBSD supports:
 - O_CLOEXEC
 - accept4(2) like API with paccept(2)
   NetBSD 8.0 will get compat accept4(2)
 - SOCK_NONBLOCK
 - SOCK_CLOEXEC
 - dup3(2)

PR-URL: https://github.com/libuv/libuv/pull/1534
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-09-23 20:40:01 -04:00
Kamil Rytarowski
fbb8132d90
test: add NetBSD support to test-udp-ipv6.c
NetBSD and FreeBSD can share the can_ipv6_ipv4_dual() function as
is. This commit also corrects the function definition to be
compliant with C standards. This fixes a warning on
NetBSD 8.99.2 with GCC 5.4.0.

PR-URL: https://github.com/libuv/libuv/pull/1535
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-09-23 20:26:02 -04:00
darobs
c78caf0b34 win,build: keep cwd when setting build environment
Fixes: https://github.com/libuv/libuv/issues/1545
PR-URL: https://github.com/libuv/libuv/pull/1546
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
2017-09-20 17:37:50 +02:00
Nick Logan
b0653625e2
unix: truncate destination in uv_fs_copyfile()
This commit adds the O_TRUNC flag to the destination file in
the sendfile() fallback. This allows smaller source files to
be properly copied into larger existing destination files.

Refs: https://github.com/libuv/libuv/pull/1551
PR-URL: https://github.com/libuv/libuv/pull/1552
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-09-20 09:19:44 -04:00
cjihrig
a41f8b52e1
unix: support copying empty files
Initialize the error variable in uv_fs_copyfile() to zero. If
the source file being copied has no data in it, then it's
possible to make it to the exit without ever setting error.
In this situation, the function's behavior is unpredictable.

Refs: https://github.com/libuv/libuv/pull/1551
PR-URL: https://github.com/libuv/libuv/pull/1552
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-09-20 09:18:27 -04:00
cjihrig
eaf25ae3eb
unix: use fchmod() in uv_fs_copyfile()
This commit introduces fchmod() in uv_fs_copyfile() to set the
mode of the destination file.

Refs: https://github.com/nodejs/node/issues/15394
PR-URL: https://github.com/libuv/libuv/pull/1547
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2017-09-14 19:15:55 -04:00
Bartosz Sosnowski
6ad1e81547 win,tty: improve SIGWINCH support
Add SetWinEventHook for EVENT_CONSOLE_LAYOUT for better detection of
console resize events.

Ref: https://github.com/nodejs/node/issues/13197
PR-URL: https://github.com/libuv/libuv/pull/1408
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2017-09-14 10:25:57 +02:00
tux.uudiin
832ab902cf
win: fix buffer size in uv__getpwuid_r()
PR-URL: https://github.com/libuv/libuv/pull/1467
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
2017-09-07 10:36:20 -04:00
Kamil Rytarowski
0b41b0ad39
unix: limit uv__has_forked_with_cfrunloop to macOS
The uv__has_forked_with_cfrunloop local variable is unused on
BSDs and causes compilation warnings. Observed on NetBSD/amd64
8.99.2 with GCC 5.4.0.

PR-URL: https://github.com/libuv/libuv/pull/1529
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-09-07 10:14:22 -04:00
cjihrig
1a682cb7c0
Now working on version 1.14.2 2017-09-06 09:50:12 -04:00
cjihrig
ff0e8a4571
Add SHA to ChangeLog 2017-09-06 09:41:30 -04:00
cjihrig
b0f9fb2a07
2017.09.07, Version 1.14.1 (Stable)
Changes since version 1.14.0:

* fs, win: add support for user symlinks (Bartosz Sosnowski)

* cygwin: include uv-posix.h header (Joel Winarske)

* zos: fix semaphore initialization (jBarz)

* zos: improve loop_count benchmark performance (jBarz)

* zos, test: flush out the oob data in callback (jBarz)

* unix,win: check for bad flags in uv_fs_copyfile() (cjihrig)

* unix: modify argv[0] when process title is set (Matthew Taylor)

* unix: don't use req->loop in uv__fs_copyfile() (cjihrig)

* doc: fix a trivial typo (Vladimír Čunát)

* android: fix uv_cond_timedwait on API level < 21 (Gergely Nagy)

* win: add uv__once_init() calls (Bartosz Sosnowski)

* unix,windows: init all requests in fs calls (cjihrig)

* unix,windows: return UV_EINVAL on NULL fs reqs (cjihrig)

* windows: add POST macro to fs functions (cjihrig)

* unix: handle partial sends in uv_fs_copyfile() (A. Hauptmann)

* Revert "win, test: fix double close in test runner" (Bartosz
  Sosnowski)

* win, test: remove surplus CloseHandle (Bartosz Sosnowski)
2017-09-06 09:41:30 -04:00
Bartosz Sosnowski
e79589d550
win, test: remove surplus CloseHandle
Fixes: https://github.com/libuv/libuv/issues/1426
PR-URL: https://github.com/libuv/libuv/pull/1523
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-09-06 09:26:58 -04:00
Bartosz Sosnowski
eb4a37c8f6
Revert "win, test: fix double close in test runner"
Causes test output to be lost.

This reverts commit bded0fa4f0.

Refs: https://github.com/libuv/libuv/issues/1426
Refs: https://github.com/libuv/libuv/pull/1450
PR-URL: https://github.com/libuv/libuv/pull/1523
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-09-06 09:24:09 -04:00
Andreas Hauptmann
dff7ebe4f0
unix: handle partial sends in uv_fs_copyfile()
uv_fs_sendfile() is used as the fallback for uv_fs_copyfile().
However, sendfile() does not necessarily send all of the bytes
in one call. This commit adds a loop to ensure all data is
sent.

Fixes: https://github.com/libuv/libuv/issues/1517
PR-URL: https://github.com/libuv/libuv/pull/1494
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-09-05 09:52:59 -04:00
cjihrig
9a4468f47a
windows: add POST macro to fs functions
This commit adds a POST macro to the Windows fs functions,
similar to the one used on Unix platforms.

PR-URL: https://github.com/libuv/libuv/pull/1509
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2017-09-02 19:04:02 -04:00
cjihrig
e539fc412f
unix,windows: return UV_EINVAL on NULL fs reqs
This commit introduces an INIT macro to file system functions on
Windows, similar to the one used on Unix platforms. The macro
checks for NULL requests, and returns UV_EINVAL in such
scenarios. This commit also adds support for passing NULL to
uv_fs_req_cleanup(). In this scenario, the function is a
no-op.

Fixes: https://github.com/libuv/libuv/issues/1508
PR-URL: https://github.com/libuv/libuv/pull/1509
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2017-09-02 19:04:01 -04:00
cjihrig
7a0e64d2e0
unix,windows: init all requests in fs calls
Prior to this change, several of the fs functions checked for
invalid arguments before initializing the fs request. If a
consumer received a UV_EINVAL from one of these functions, and
then called uv_fs_req_cleanup(), the application would crash, as
the pointer being freed was not allocated. This commit makes
sure that all fs functions initialize the request before returning.

Fixes: https://github.com/libuv/libuv/issues/1508
PR-URL: https://github.com/libuv/libuv/pull/1509
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2017-09-02 19:04:01 -04:00
Bartosz Sosnowski
165c63b96c
win: add uv__once_init() calls
Some functions, such as uv_fs_scandir() can be called with
a NULL loop argument. In this case, it's possible that the
Windows API hasn't been initialized, leading to a crash.
This commit adds additional uv__once_init() calls to mitigate
this situation.

Fixes: https://github.com/libuv/libuv/issues/1488
PR-URL: https://github.com/libuv/libuv/pull/1512
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-09-02 15:56:10 -04:00
Gergely Nagy
36ea2cb295
android: fix uv_cond_timedwait on API level < 21
This commit partly reverses libuv#1441.
It is true that pthread_cond_timedwait is available on older API levels,
but if we do not call pthread_condattr_setclock then we cannot use
timestamps from CLOCK_MONOTONIC with pthread_cond_timedwait.

PR-URL: https://github.com/libuv/libuv/pull/1511
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2017-09-01 14:33:05 +02:00
Vladimír Čunát
737b482baa
doc: fix a trivial typo
PR-URL: https://github.com/libuv/libuv/pull/1516
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2017-09-01 13:33:33 +02:00
cjihrig
564677d325
unix: don't use req->loop in uv__fs_copyfile()
Pass NULL instead of req->loop to the various libuv functions
called from uv__fs_copyfile().

Refs: https://github.com/libuv/libuv/pull/1494
PR-URL: https://github.com/libuv/libuv/pull/1504
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-08-22 09:53:38 -04:00
Matthew Taylor
afc05a3ab0
unix: modify argv[0] when process title is set
Ensure that argv[0] is changed when uv_set_process_title() is
called. Previously, on some unix systems uv__set_process_title()
was being called, but argv[0] was not modified.

Partial revert of 78c17238f4.

Refs: https://github.com/libuv/libuv/pull/1396
PR-URL: https://github.com/libuv/libuv/pull/1487
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-08-21 22:37:31 -04:00
cjihrig
8a95c6b5c1
unix,win: check for bad flags in uv_fs_copyfile()
Refs: https://github.com/libuv/libuv/pull/1465
PR-URL: https://github.com/libuv/libuv/pull/1493
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-08-21 22:07:13 -04:00
John Barboza
607dc073eb
zos, test: flush out the oob data in callback
Need to flush out the OOB data. Otherwise, this callback will get
triggered on every poll with nread = 0.

PR-URL: https://github.com/libuv/libuv/pull/1484
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-08-21 13:11:35 +02:00
John Barboza
cbac5f1693 zos: improve loop_count benchmark performance
After the poll call, the code updates all the event objects
in the array. Instead, use the integer value returned by poll
to limit the number of epoll_event objects that are updated.
e.g. If poll returns 5, we know that we only need to update
5 event objects.

PR-URL: https://github.com/libuv/libuv/pull/1391
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-08-19 21:45:02 +02:00
John Barboza
e80921c1ae zos: fix semaphore initialization
To set an initial value to a semaphore, the semop call won't do it.
We need to use the semctl call with the SETVAL flag

PR-URL: https://github.com/libuv/libuv/pull/1473
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-08-19 21:43:09 +02:00
Joel Winarske
ce41af28c8 cygwin: include uv-posix.h header
Fixes: https://github.com/libuv/libuv/issues/1480
PR-URL: https://github.com/libuv/libuv/pull/1482
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2017-08-19 21:41:17 +02:00
Bartosz Sosnowski
89d31932a5 fs, win: add support for user symlinks
Add SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE to CreateSymbolicLink
which allows unelevated users to create symbolic links on supported
platforms.

Fixes: https://github.com/libuv/libuv/issues/1157
PR-URL: https://github.com/libuv/libuv/pull/1466
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-08-18 14:21:58 +02:00
cjihrig
c8ee8bef9b
Now working on version 1.14.1 2017-08-16 10:21:47 -04:00
cjihrig
1f4ec02715
Add SHA to ChangeLog 2017-08-16 10:11:34 -04:00
cjihrig
e0d31e9e21
2017.08.17, Version 1.14.0 (Stable)
Changes since version 1.13.1:

* unix: check for NULL in uv_os_unsetenv for parameter name (André
  Klitzing)

* doc: add thread safety warning for process title (Matthew Taylor)

* unix: always copy process title into local buffer (Matthew Taylor)

* poll: add support for OOB TCP and GPIO interrupts (CurlyMoo)

* win,build: fix appveyor properly (Refael Ackermann)

* win: include filename in dlopen error message (Ben Noordhuis)

* aix: add netmask, mac address into net interfaces (Gireesh Punathil)

* unix, windows: map EREMOTEIO errno (Ben Noordhuis)

* unix: fix wrong MAC of uv_interface_address (XadillaX)

* win,build: fix building from Windows SDK or VS console (Saúl Ibarra
  Corretgé)

* github: fix link to help repo in issue template (Ben Noordhuis)

* zos: remove nonexistent include from autotools build (Saúl Ibarra
  Corretgé)

* misc: remove reference to pthread-fixes.h from LICENSE (Saúl Ibarra
  Corretgé)

* docs: fix guide source code example paths (Anticrisis)

* android: fix compilation with new NDK versions (Saúl Ibarra Corretgé)

* misc: add android-toolchain to .gitignore (Saúl Ibarra Corretgé)

* win, fs: support unusual reparse points (Bartosz Sosnowski)

* android: fix detection of pthread_condattr_setclock (Saúl Ibarra
  Corretgé)

* android: remove no longer needed check (Saúl Ibarra Corretgé)

* doc: update instructions for building on Android (Saúl Ibarra
  Corretgé)

* win, process: support semicolons in PATH variable (Bartosz Sosnowski)

* doc: document uv_async_(init|send) return values (Ben Noordhuis)

* doc: add Android as a tier 3 supported platform (Saúl Ibarra Corretgé)

* unix: add missing semicolon (jBarz)

* win, test: fix double close in test runner (Bartosz Sosnowski)

* doc: update supported windows version baseline (Ben Noordhuis)

* test,zos: skip chown root test (jBarz)

* test,zos: use gid=-1 to test spawn_setgid_fails (jBarz)

* zos: fix hr timer resolution (jBarz)

* android: fix blocking recvmsg due to netlink bug (Jacob Segal)

* zos: read more accurate rss info from RSM (jBarz)

* win: allow bound/connected socket in uv_tcp_open() (Maciej Szeptuch
  (Neverous))

* doc: differentiate SmartOS and SunOS support (cjihrig)

* unix: make uv_poll_stop() remove fd from pollset (Ben Noordhuis)

* unix, windows: add basic uv_fs_copyfile() (cjihrig)
2017-08-16 10:11:33 -04:00
cjihrig
766d7e9c0b
unix, windows: add basic uv_fs_copyfile()
Fixes: https://github.com/libuv/libuv/issues/925
PR-URL: https://github.com/libuv/libuv/pull/1465
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-08-15 10:43:49 -04:00
Ben Noordhuis
ce56a85b19 unix: make uv_poll_stop() remove fd from pollset
Avoid repeated wake-ups in `uv__io_poll()` when the previously watched
file descriptor has been duplicated (with `dup(2)`) and then closed.

Because epoll reports events for _file descriptions_ rather than _file
descriptors_, events on the duplicated file descriptor cause the event
loop to wake up.

Libuv then tries to unregister the event listener for the original file
descriptor but that fails with EBADF because the file descriptor is
closed.

Since libuv uses epoll in level-triggered mode, it effectively results
in a busy loop because the event is re-reported as soon as libuv calls
epoll_wait() again.

I tried hard to write a test case for this but there is no directly
observable behavior, only increased CPU usuage.

Fixes: https://github.com/libuv/libuv/issues/1148
PR-URL: https://github.com/libuv/libuv/pull/1468
Reviewed-By: Colin Ihrig <cjihrig@gmail.com
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-08-10 16:20:40 +02:00
cjihrig
3af5512950 doc: differentiate SmartOS and SunOS support
Refs: https://github.com/libuv/libuv/pull/991
Refs: https://github.com/libuv/libuv/issues/1458
PR-URL: https://github.com/libuv/libuv/pull/1469
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-08-09 16:24:14 -04:00