eb3f48eb | 24-Sep-2015 |
Jeremy Whitlock |
win: do not read more from stream than available On Windows the pipe implementation could read more from a stream than was available and it would create an assertion failure. This chang
win: do not read more from stream than available On Windows the pipe implementation could read more from a stream than was available and it would create an assertion failure. This change will make it so we read the minimum of the available data or the length of the data. To test this, I took the existing ipc_send_recv_tcp test and updated it to do two writes and two read on each side of the pipe since that was the reproduction recipe used by the reporter. This approach reproduced the issue on Windows and the committed fix resolved the issue. Fixes: https://github.com/libuv/libuv/issues/505 PR-URL: https://github.com/libuv/libuv/pull/549 Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
show more ...
|
e0250b7d | 03-Dec-2015 |
Joran Dirk Greef |
win: fix path for removed and renamed fs events Previous behavior on Windows was to set the path to NULL for removed and renamed fs events. This was because the path provided by Read
win: fix path for removed and renamed fs events Previous behavior on Windows was to set the path to NULL for removed and renamed fs events. This was because the path provided by ReadDirectoryChangesW might (in rare cases) be an 8.3 short name which could then no longer be converted to a long name after the path had been removed or renamed. This meant that the user had to detect which path was actually deleted or renamed and required the user to rescan the entire watched subtree, taking several seconds or more for large subtrees. However, ReadDirectoryChangesW is publicly documented to emit 8.3 short names if the original handle for the changed path was opened using an 8.3 short name, and libuv may already emit 8.3 short names for other events if the path cannot be explicitly resolved to a long name. This commit fixes the path for removed and renamed fs events, and does not set the path to NULL, even if the path might be an 8.3 short name. This makes it possible for the user to do a partial scan of the subtree, restricting the scan to paths which match the long form or 8.3 short name (even if some of these are false positive matches). This means that deletes and renames can now be detected accurately on Windows within a few milliseconds. Fixes: https://github.com/libuv/libuv/issues/634 Refs: https://github.com/libuv/libuv/pull/199 PR-URL: https://github.com/libuv/libuv/pull/639 Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
show more ...
|
e76b8838 | 18-Sep-2015 |
Yuval Brik |
fs: add uv_fs_realpath() Equivalent to realpath(3), returns the full resolved absolute path of a file or directory. PR-URL: https://github.com/libuv/libuv/pull/531 Reviewed-
fs: add uv_fs_realpath() Equivalent to realpath(3), returns the full resolved absolute path of a file or directory. PR-URL: https://github.com/libuv/libuv/pull/531 Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
show more ...
|
176fdc73 | 03-Dec-2015 |
Saúl Ibarra Corretgé |
linux,fs: fix p{read,write}v with a 64bit offset According to [0] we need to pass it in 2 32bit registers on some platforms such as MIPS. Fix inspired by the musl libc implementation [1]
linux,fs: fix p{read,write}v with a 64bit offset According to [0] we need to pass it in 2 32bit registers on some platforms such as MIPS. Fix inspired by the musl libc implementation [1]. [0]: http://man7.org/linux/man-pages/man2/syscall.2.html#NOTES [1]: http://git.musl-libc.org/cgit/musl/tree/src/unistd/preadv.c Fixes: https://github.com/libuv/libuv/issues/473 Refs: https://github.com/libuv/libuv/pull/498 Refs: https://github.com/libuv/libuv/pull/627 PR-URL: https://github.com/libuv/libuv/pull/638 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
show more ...
|
0761bfe6 | 02-Dec-2015 |
Fedor Indutny |
fsevents: fix race on simultaneous init+close When `uv_fsevents_t` handle is closed immediately after initializing, there is a possibility that the `CFRunLoop`'s thread will process both
fsevents: fix race on simultaneous init+close When `uv_fsevents_t` handle is closed immediately after initializing, there is a possibility that the `CFRunLoop`'s thread will process both of these events at the same time. `uv__is_active(handle)` will return `0`, and the `uv_close()` semaphore will be unblocked, leading to the use after free in node.js. See: https://github.com/nodejs/node/issues/4091 PR-URL: https://github.com/libuv/libuv/pull/637 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
show more ...
|
43994b4e | 30-Nov-2015 |
kkdaemon |
android: support api level less than 21 Remove restriction to Android API level >= 21, now libuv can be used with Android API level at least 14. Direct use of getpwuid_r functio
android: support api level less than 21 Remove restriction to Android API level >= 21, now libuv can be used with Android API level at least 14. Direct use of getpwuid_r function resulted in linker errors in applications were built against API level below 21. That function was 'officially' introduced in Android API level 21, but it exists in libc beginning from API level at least 14. So try to get a pointer to getpwuid_r at runtime using dlsym when building libuv with API level < 21. PR-URL: https://github.com/libuv/libuv/pull/633 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
show more ...
|
f5796d2f | 20-Nov-2015 |
Imran Iqbal |
test: fix test/test-tty.c for AIX '/dev/random' causes 'isatty()' to return 1 on AIX[1]. This causes an issue where 'dev/tty' is opened (hard coded in src/unix/tty.c:uv_tty_init). Tr
test: fix test/test-tty.c for AIX '/dev/random' causes 'isatty()' to return 1 on AIX[1]. This causes an issue where 'dev/tty' is opened (hard coded in src/unix/tty.c:uv_tty_init). Tried to replace the hardcoded value with what is returned by 'ttyname()' but on AIX all that is returned is '/dev/'. This seems to be a bug with the AIX kernel. [1]http://goo.gl/wGa7mf PR-URL: https://github.com/libuv/libuv/pull/624 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
show more ...
|
7b9bc28e | 19-Nov-2015 |
Tony Kelman |
win: map ERROR_BAD_PATHNAME to UV_ENOENT e.g. when trying to call uv_fs_stat on "Z:\\:\\a" for a network drive Z: Refs: https://github.com/joyent/libuv/issues/390 PR-URL: https:
win: map ERROR_BAD_PATHNAME to UV_ENOENT e.g. when trying to call uv_fs_stat on "Z:\\:\\a" for a network drive Z: Refs: https://github.com/joyent/libuv/issues/390 PR-URL: https://github.com/libuv/libuv/pull/623 Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
show more ...
|
5f15f72c | 18-Nov-2015 |
Saúl Ibarra Corretgé |
test: fix -Wtautological-pointer-compare warnings ~~~~ test/test-get-loadavg.c:30:14: warning: comparison of array 'avg' not equal to a null pointer is always true [-Wtautological-po
test: fix -Wtautological-pointer-compare warnings ~~~~ test/test-get-loadavg.c:30:14: warning: comparison of array 'avg' not equal to a null pointer is always true [-Wtautological-pointer-compare] test/test-getnameinfo.c:76:18: warning: comparison of array 'req.host' not equal to a null pointer is always true [-Wtautological-pointer-compare] test/test-getnameinfo.c:77:18: warning: comparison of array 'req.service' not equal to a null pointer is always true [-Wtautological-pointer-compare] ~~~~ PR-URL: https://github.com/libuv/libuv/pull/622 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
show more ...
|
9bbc1137 | 05-Nov-2015 |
Ben Noordhuis |
unix: don't retry dup2/dup3 on EINTR Like the previous commit, but this time for UNIX platforms other than Linux. As far as I have been able to establish, dup2 and dup3 never re
unix: don't retry dup2/dup3 on EINTR Like the previous commit, but this time for UNIX platforms other than Linux. As far as I have been able to establish, dup2 and dup3 never return EINTR on OS X and FreeBSD. Even if other platforms do return EINTR, it's probably still better not to retry because it's unspecified whether the file descriptor has been closed. Fixes: https://github.com/libuv/libuv/issues/462 PR-URL: https://github.com/libuv/libuv/pull/608 Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
show more ...
|
af7a3614 | 05-Nov-2015 |
Ben Noordhuis |
linux: don't retry dup2/dup3 on EINTR Retrying seems like a bad idea in a multi-threaded program because the man page leaves it unspecified whether the file descriptor is closed afte
linux: don't retry dup2/dup3 on EINTR Retrying seems like a bad idea in a multi-threaded program because the man page leaves it unspecified whether the file descriptor is closed after EINTR. It's probably an academic issue because as far as I have been able to establish by checking the kernel sources, dup2 and dup3 never actually return EINTR. For dup3, this appears to have been the case since its introduction in v2.6.27; for dup2, it goes back to at least v2.6.18. Fixes: https://github.com/libuv/libuv/issues/462 PR-URL: https://github.com/libuv/libuv/pull/608 Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
show more ...
|
4052c747 | 11-Nov-2015 |
Santiago Gimeno |
test,freebsd: skip udp_dual_stack if not supported By default, FreeBSD has net.inet6.ip6.v6only set to 1 (i.e., no dual stack support). A new function can_ipv6_ipv4_dual is added to chec
test,freebsd: skip udp_dual_stack if not supported By default, FreeBSD has net.inet6.ip6.v6only set to 1 (i.e., no dual stack support). A new function can_ipv6_ipv4_dual is added to check its value and decide whether `udp_dual_stack` test must be skipped or not. PR-URL: https://github.com/libuv/libuv/pull/614 Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
show more ...
|
81072b98 | 02-Nov-2015 |
Ian Kronquist |
misc: remove unnecessary null pointer checks Fixes: https://github.com/libuv/libuv/issues/595 PR-URL: https://github.com/libuv/libuv/pull/604 Reviewed-By: Saúl Ibarra Corretgé <saghu
misc: remove unnecessary null pointer checks Fixes: https://github.com/libuv/libuv/issues/595 PR-URL: https://github.com/libuv/libuv/pull/604 Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
show more ...
|
f41b7386 | 16-Nov-2015 |
Saúl Ibarra Corretgé |
include: add stdio.h to uv.h Fixes a compilation problem in some platforms (notably OSX) after 6490c50. PR-URL: https://github.com/libuv/libuv/pull/618 Reviewed-By: Ben Noor
include: add stdio.h to uv.h Fixes a compilation problem in some platforms (notably OSX) after 6490c50. PR-URL: https://github.com/libuv/libuv/pull/618 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Jeremy Whitlock <jwhitlock@apache.org>
show more ...
|
6490c508 | 16-Nov-2015 |
Petka Antonov |
misc: expose handle print APIs PR-URL: https://github.com/libuv/libuv/pull/291 Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com> |
baf700ac | 11-Nov-2015 |
Imran Iqbal |
test: skip process_title for AIX uv_(get|set)_process_title is not implemented for AIX. See unix/aix.c PR-URL: https://github.com/libuv/libuv/pull/616 Reviewed-By: Ben Noordhuis
test: skip process_title for AIX uv_(get|set)_process_title is not implemented for AIX. See unix/aix.c PR-URL: https://github.com/libuv/libuv/pull/616 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
show more ...
|
77eda8d9 | 11-Nov-2015 |
Nikolai Vavilov |
win: properly return UV_EBADF when _close() fails Previously, libuv didn't return the correct error code when attempting to close an invalid file descriptor with `uv_fs_close()`.
win: properly return UV_EBADF when _close() fails Previously, libuv didn't return the correct error code when attempting to close an invalid file descriptor with `uv_fs_close()`. PR-URL: https://github.com/libuv/libuv/pull/613 Reviewed-by: Bert Belder <bertbelder@gmail.com>
show more ...
|
dfdecf00 | 28-Oct-2015 |
Louis DeJardin |
pipe: enable inprocess uv_write2 on Windows When duplicating the socket handle being sent the target process id is defaulted to the current process id. This enables uv_write2 to be u
pipe: enable inprocess uv_write2 on Windows When duplicating the socket handle being sent the target process id is defaulted to the current process id. This enables uv_write2 to be used for thread-clustering in addition to process-clustering on multi-threaded programming languages. The ipc tests are updated to run in two modes. In the _inproc mode the echo work is done on a second thread instead of in a second process. An internal function int uv_current_pid() is added to the windows specific code which caches the value of GetCurrentProcessId(). This means uv_write2 does not call GetCurrentProcessId() every inprocess send. Refs: https://github.com/joyent/libuv/issues/926 PR-URL: https://github.com/libuv/libuv/pull/540 Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
show more ...
|
a6da5d7d | 02-Nov-2015 |
Ben Noordhuis |
darwin: abort() if (un)locking fs mutex fails The pthread_mutex_lock() and pthread_mutex_unlock() calls logically cannot fail in uv__fs_write() but let's check the return value anyway:
darwin: abort() if (un)locking fs mutex fails The pthread_mutex_lock() and pthread_mutex_unlock() calls logically cannot fail in uv__fs_write() but let's check the return value anyway: cosmic rays and memory corruption do happen. PR-URL: https://github.com/libuv/libuv/pull/603 Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
show more ...
|
f3216246 | 30-Oct-2015 |
Angel Leon |
doc: fix typo in README PR-URL: https://github.com/libuv/libuv/pull/598 Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com> |
010f0b96 | 18-Oct-2015 |
Miodrag Milanovic |
win: fix comment Fixes the following: ~~~~ src/win/tty.c: In function 'uv_tty_capture_initial_style': src/win/tty.c:211:3: error: "/" within comment [-Werror=comment]
win: fix comment Fixes the following: ~~~~ src/win/tty.c: In function 'uv_tty_capture_initial_style': src/win/tty.c:211:3: error: "/" within comment [-Werror=comment] / Assumption: Caller has acquired uv_tty_output_lock. */ ~~~~ PR-URL: https://github.com/libuv/libuv/pull/578 Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
show more ...
|
e9b5a86a | 29-Oct-2015 |
Andrius Bentkus |
docs: clarify documentation of uv_tcp_init_ex I think this makes it clear that the flags can't contain any other information. PR-URL: https://github.com/libuv/libuv/pull/592
docs: clarify documentation of uv_tcp_init_ex I think this makes it clear that the flags can't contain any other information. PR-URL: https://github.com/libuv/libuv/pull/592 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
show more ...
|
7d7400c8 | 22-Oct-2015 |
Wink Saville |
test: use FQDN in getaddrinfo_fail test For the getaddrinfo_fail test cases you want to use a fully qualified domain name so that in network configurations that have a search domain
test: use FQDN in getaddrinfo_fail test For the getaddrinfo_fail test cases you want to use a fully qualified domain name so that in network configurations that have a search domain the test will still fail. To create a fully qualified domain add a period at the end, see http://www.dns-sd.org/trailingdotsindomainnames.html for an explanation. Fixes: https://github.com/libuv/libuv/issues/583 PR-URL: https://github.com/libuv/libuv/pull/586 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
show more ...
|
bda29cf8 | 19-Oct-2015 |
Nathan Corvino |
unix: skip prohibited syscalls on tvOS and watchOS fork and the exec functions are marked prohibited on tvOS and watchOS, so referencing them causes compile errors. This adds pr
unix: skip prohibited syscalls on tvOS and watchOS fork and the exec functions are marked prohibited on tvOS and watchOS, so referencing them causes compile errors. This adds preprocessor conditionals to avoid calling them for those targets. PR-URL: https://github.com/libuv/libuv/pull/580 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
show more ...
|
a0e30b55 | 20-Oct-2015 |
Santiago Gimeno |
test: fix fs_event_watch_file_currentdir flakiness In FreeBSD 10.2 the test sometimes times out because the "touch file" timer fires before the "watch file" event has been registered in
test: fix fs_event_watch_file_currentdir flakiness In FreeBSD 10.2 the test sometimes times out because the "touch file" timer fires before the "watch file" event has been registered in the kqueue. Increasing the timeout value seems to fix the issue. PR-URL: https://github.com/libuv/libuv/pull/581 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
show more ...
|