Commit Graph

4148 Commits

Author SHA1 Message Date
cjihrig
65751b5cd6 Now working on version 1.10.3 2017-01-09 13:56:05 -05:00
cjihrig
677e7ce1e1 Add SHA to ChangeLog 2017-01-09 13:42:50 -05:00
cjihrig
cb9f579a45 2017.01.10, Version 1.10.2 (Stable)
Changes since version 1.10.1:

* Now working on version 1.10.2 (cjihrig)

* darwin: fix fsync and fdatasync (Joran Dirk Greef)

* Revert "Revert "win,tty: add support for ANSI codes in win10 v1511""
  (Santiago Gimeno)

* win,tty: fix MultiByteToWideChar output buffer (Santiago Gimeno)

* win: remove dead code related to BACKUP_SEMANTICS (Sam Roberts)

* win: fix comment in quote_cmd_arg (Eric Sciple)

* darwin: use clock_gettime in macOS 10.12 (Saúl Ibarra Corretgé)

* win, tty: fix crash on restarting with pending data (Nicholas Vavilov)

* fs: fix uv__to_stat on BSD platforms (Santiago Gimeno)

* win: map ERROR_ELEVATION_REQUIRED to UV_EACCES (Richard Lau)

* win: fix free() on bad input in uv_getaddrinfo() (Ben Noordhuis)
2017-01-09 13:42:49 -05:00
Ben Noordhuis
7bfb5ae7f9 win: fix free() on bad input in uv_getaddrinfo()
The error path frees `req->alloc` but that hasn't been set yet when
`service` and `node` are both NULL.  Simply return instead of jumping
to the error handling block.

Fixes: https://github.com/libuv/libuv/issues/1122
PR-URL: https://github.com/libuv/libuv/pull/1123
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-01-08 16:29:37 -05:00
Richard Lau
11ce5df5ea win: map ERROR_ELEVATION_REQUIRED to UV_EACCES
uv_spawn() on Windows will fail with ERROR_ELEVATION_REQUIRED
if attempting to run an application that requires elevation.

Fixes: https://github.com/nodejs/node/issues/9464
PR-URL: https://github.com/libuv/libuv/pull/1154
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-12-16 14:50:32 -05:00
Santiago Gimeno
c02176a230
fs: fix uv__to_stat on BSD platforms
Fix the #ifdef logic to make sure all the available fields filled in the
`stat` struct are correcly copied into the `uv_stat_t` struct. Before
this change, the `n_sec` were being set to 0.

PR-URL: https://github.com/libuv/libuv/pull/1152
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-12-06 12:08:18 +01:00
Nikolai Vavilov
357b9a7733 win, tty: fix crash on restarting with pending data
When reading from tty is restarted while there is pending data,
uv_tty_read_start calls uv_insert_pending_req instead of uv_tty_queue_read
to avoid losing keypresses. But reading can be stopped and restarted
multiple times before the req is handled, which caused an assertion error.
Setting the UV_HANDLE_READ_PENDING flag prevents uv_insert_pending_req
from being called again until the req is handled.

Fixes: https://github.com/nodejs/node/issues/9690
PR-URL: https://github.com/libuv/libuv/pull/1158
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-12-06 09:47:35 +01:00
Saúl Ibarra Corretgé
f8d4805087 darwin: use clock_gettime in macOS 10.12
PR-URL: https://github.com/libuv/libuv/pull/1073
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Imran Iqbal <imran@imraniqbal.org>
2016-12-06 09:44:48 +01:00
Eric Sciple
8658ef06c2 win: fix comment in quote_cmd_arg
PR-URL: https://github.com/libuv/libuv/pull/1113
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-by: Bert Belder <bertbelder@gmail.com>
2016-12-01 22:30:05 +01:00
Sam Roberts
7dfa54d6f8 win: remove dead code related to BACKUP_SEMANTICS
Remove several conditionals which appear to carefully set or clear
FILE_FLAG_BACKUP_SEMANTICS, but since  4365896,
FILE_FLAG_BACKUP_SEMANTICS is unconditionally ORed into the attributes
before CreateFileW() is called.

PR-URL: https://github.com/libuv/libuv/pull/1149
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-by: Bert Belder <bertbelder@gmail.com>
2016-12-01 22:17:57 +01:00
Santiago Gimeno
c2f0e4f64e
win,tty: fix MultiByteToWideChar output buffer
Make sure there's enough room in the output buffer by dynamically
allocating memory in case the size of the buffer needs to be greater
than 8192 characters.

PR-URL: https://github.com/libuv/libuv/pull/1143
Refs: https://github.com/libuv/libuv/pull/1138
Refs: https://github.com/libuv/libuv/pull/889
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Imran Iqbal <imran@imraniqbal.org>
2016-11-29 10:36:44 +01:00
Santiago Gimeno
445e3a1f06
Revert "Revert "win,tty: add support for ANSI codes in win10 v1511""
To bring back support for ANSI codes in win10 v1511.

This reverts commit 8cbabaa817.

PR-URL: https://github.com/libuv/libuv/pull/1143
Refs: https://github.com/libuv/libuv/pull/1138
Refs: https://github.com/libuv/libuv/pull/889
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Imran Iqbal <imran@imraniqbal.org>
2016-11-29 10:35:59 +01:00
Joran Dirk Greef
c1c55ee1aa
darwin: fix fsync and fdatasync
Apple's fsync and fdatasync explicitly do NOT flush the drive write
cache to the drive platters. This is in contrast to Linux's fsync and
fdatasync which do, according to recent man pages. F_FULLFSYNC is
Apple's equivalent for flushing buffered data to permanent storage.

PR-URL: https://github.com/libuv/libuv/pull/1124
Refs: https://github.com/nodejs/node/issues/9439
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2016-11-17 09:41:58 +01:00
cjihrig
a2a85f823f Now working on version 1.10.2 2016-11-16 13:19:32 -05:00
cjihrig
e7624d68cb Add SHA to ChangeLog 2016-11-16 13:03:51 -05:00
cjihrig
2e49e332bd 2016.11.17, Version 1.10.1 (Stable)
Changes since version 1.10.0:

* Now working on version 1.10.1 (cjihrig)

* win: fix anonymous union syntax (Brad King)

* unix: use uv__is_closing everywhere (Santiago Gimeno)

* win: add missing break statement (cjihrig)

* doc: fix wrong man page link for uv_fs_lstat() (Michele Caini)

* win, tty: handle empty buffer in uv_tty_write_bufs (Hitesh
  Kanwathirtha)

* doc: add cjihrig alternative GPG ID (cjihrig)

* Revert "win,tty: add support for ANSI codes in win10 v1511" (Ben
  Noordhuis)
2016-11-16 13:03:50 -05:00
Ben Noordhuis
8cbabaa817 Revert "win,tty: add support for ANSI codes in win10 v1511"
Causes regressions on Windows 10 in applications that use ANSI codes.

Also reverts commit 0895ccf ("win: fix typo in type name") and
commit d0c2641 ("win, tty: handle empty buffer in uv_tty_write_bufs".)

This reverts commit d0c26414b4.
This reverts commit 0895ccfc8c.
This reverts commit 58ccfd4c21.

PR-URL: https://github.com/libuv/libuv/pull/1138
Refs: https://github.com/libuv/libuv/issues/1135
Refs: https://github.com/libuv/libuv/pull/889
Refs: https://github.com/nodejs/node/issues/9542
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Imran Iqbal <imran@imraniqbal.org>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2016-11-15 16:52:42 +01:00
cjihrig
5cbf733ab6 doc: add cjihrig alternative GPG ID
The v1.10.0 release was signed with this key by mistake.

Fixes: https://github.com/libuv/libuv/issues/1140
PR-URL: https://github.com/libuv/libuv/pull/1141
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-11-15 10:30:23 -05:00
Hitesh Kanwathirtha
d0c26414b4 win, tty: handle empty buffer in uv_tty_write_bufs
In uv_tty_write_bufs, if the console supports Virtual Terminal sequences,
we try to convert the passed in utf8 buffer to utf16. However, we need
to check if the buffer is of non-zero length- otherwise,
MultiByteToWideChar returns an error.

Fixes: https://github.com/libuv/libuv/issues/1135
Fixes: https://github.com/nodejs/node/issues/9542
PR-URL: https://github.com/libuv/libuv/pull/1139
Refs: https://github.com/libuv/libuv/pull/889
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Imran Iqbal <imran@imraniqbal.org>
2016-11-15 09:54:25 +01:00
Michele Caini
5f34766a14 doc: fix wrong man page link for uv_fs_lstat()
PR-URL: https://github.com/libuv/libuv/pull/1134
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Imran Iqbal <imran@imraniqbal.org>
2016-11-11 15:43:14 -05:00
cjihrig
d9d207774e win: add missing break statement
PR-URL: https://github.com/libuv/libuv/pull/1120
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-11-03 19:44:50 -04:00
Santiago Gimeno
668d24d88e
unix: use uv__is_closing everywhere
PR-URL: https://github.com/libuv/libuv/pull/1117
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-11-03 11:11:16 +01:00
Brad King
060877d483 win: fix anonymous union syntax
Remove use of the DUMMYUNIONNAME macro from our definitions of
internal winapi anonymous unions. This macro was added to
winternl.h in Windows SDK v7.0a in combination with a conditional
definition of DUMMYUNIONNAME to either empty or `u` depending on
compiler support. libuv doesn't support any compilers that lack
anonymous unions, but does support compilers such as VS 2008 that
complain about the presence of the DUMMYUNIONNAME identifier on an
anonymous union because their winapi headers do not define the
macro publicly.

PR-URL: https://github.com/libuv/libuv/pull/1090
Reviewed-By: João Reis <reis@janeasystems.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-11-02 19:38:24 -04:00
cjihrig
531f06ecfe Now working on version 1.10.1 2016-10-24 10:24:20 -04:00
cjihrig
039101f32e Add SHA to ChangeLog 2016-10-24 09:52:34 -04:00
cjihrig
c8a373c729 2016.10.25, Version 1.10.0 (Stable)
Changes since version 1.9.1:

* Now working on version 1.9.2 (Saúl Ibarra Corretgé)

* doc: add cjihrig GPG ID (cjihrig)

* win,build: fix compilation on old Windows / MSVC (Saúl Ibarra
  Corretgé)

* darwin: fix setting fd to non-blocking in select(() trick (Saúl Ibarra
  Corretgé)

* unix: allow nesting of kqueue fds in uv_poll_start (Ben Noordhuis)

* doc: fix generation the first time livehtml runs (Saúl Ibarra
  Corretgé)

* test: fix test_close_accept flakiness on Centos5 (Santiago Gimeno)

* license: libuv is no longer a Node project (Saúl Ibarra Corretgé)

* license: add license text we've been using for a while (Saúl Ibarra
  Corretgé)

* doc: add licensing information to README (Saúl Ibarra Corretgé)

* win,pipe: fixed formatting, DWORD is long unsigned (Miodrag Milanovic)

* win: support sub-second precision in uv_fs_futimes() (Jason
  Ginchereau)

* unix: ignore EINPROGRESS in uv__close (Saúl Ibarra Corretgé)

* doc: add Imran Iqbal (iWuzHere) to maintainers (Imran Iqbal)

* doc: update docs with AIX related information (Imran Iqbal)

* test: silence build warnings (Kári Tristan Helgason)

* doc: add iWuzHere GPG ID (Imran Iqbal)

* linux-core: fix uv_get_total/free_memory on uclibc (Nicolas Cavallari)

* build: fix build on DragonFly (Michael Neumann)

* unix: correctly detect named pipes on DragonFly (Michael Neumann)

* test: make tap output the default (Ben Noordhuis)

* test: don't dump output for skipped tests (Ben Noordhuis)

* test: improve formatting of diagnostic messages (Ben Noordhuis)

* test: remove unused RETURN_TODO macro (Ben Noordhuis)

* doc: fix stream typos (Pierre-Marie de Rodat)

* doc: update coding style link (Imran Iqbal)

* unix,fs: use uint64_t instead of unsigned long (Imran Iqbal)

* build: check for warnings for -fvisibility=hidden (Imran Iqbal)

* unix: remove unneeded TODO note (Saúl Ibarra Corretgé)

* test: skip tty_pty test if pty is not available (Luca Bruno)

* sunos: set phys_addr of interface_address using ARP (Brian Maher)

* doc: clarify callbacks won't be called in error case (Saúl Ibarra
  Corretgé)

* unix: don't convert stat buffer when syscall fails (Ben Noordhuis)

* win: compare entire filename in watch events (cjihrig)

* doc: add a note on safe reuse of uv_write_t (neevek)

* linux: fix potential event loop stall (Ben Noordhuis)

* unix,win: make uv_get_process_title() stricter (cjihrig)

* test: close server before initiating new connection (John Barboza)

* test: account for multiple handles in one ipc read (John Barboza)

* unix: fix errno and retval conflict (liuxiaobo)

* doc: add missing entry in uv_fs_type enum (Michele Caini)

* unix: preserve loop->data across loop init/done (Ben Noordhuis)

* win: return UV_EINVAL on bad uv_tty_mode mode arg (Ben Noordhuis)

* win: simplify memory copy logic in fs.c (Ben Noordhuis)

* win: fix compilation on mingw (Bartosz Sosnowski)

* win: ensure 32-bit printf precision (Matej Knopp)

* darwin: handle EINTR in /dev/tty workaround (Ben Noordhuis)

* test: fix OOB buffer access (Saúl Ibarra Corretgé)

* test: don't close CRT fd handed off to uv_pipe_t (Saúl Ibarra
  Corretgé)

* test: fix android build error. (sunjin.lee)

* win: evaluate timers when system wakes up (Bartosz Sosnowski)

* doc: add supported platforms description (Saúl Ibarra Corretgé)

* win: fix lstat reparse point without link data (Jason Ginchereau)

* unix,win: make on_alloc_cb failures more resilient (Saúl Ibarra
  Corretgé)

* zos: add support for new platform (John Barboza)

* test: make tcp_close_while_connecting more resilient (Saúl Ibarra
  Corretgé)

* build: use '${prefix}' for pkg-config 'exec_prefix' (Matt Clarkson)

* build: GNU/kFreeBSD support (Jeffrey Clark)

* zos: use PLO instruction for atomic operations (John Barboza)

* zos: use pthread helper functions (John Barboza)

* zos: implement uv__fs_futime (John Barboza)

* unix: expand range of values for usleep (John Barboza)

* zos: track unbound handles and bind before listen (John Barboza)

* test: improve tap output on test failures (Santiago Gimeno)

* test: refactor fs_event_close_in_callback (Julien Gilli)

* zos: implement uv__io_check_fd (John Barboza)

* unix: unneccessary use const qualifier in container_of (John Barboza)

* win,tty: add support for ANSI codes in win10 v1511 (Imran Iqbal)

* doc: add santigimeno to maintainers (Santiago Gimeno)

* win: fix typo in type name (Saúl Ibarra Corretgé)

* unix: always define pthread barrier fallback pad (Saúl Ibarra
  Corretgé)

* test: use RETURN_SKIP in spawn_setuid_setgid test (Santiago Gimeno)

* win: add disk read/write count to uv_getrusage (Imran Iqbal)

* doc: document uv_fs_realpath caveats (Saúl Ibarra Corretgé)

* test: improve spawn_setuid_setgid test (Santiago Gimeno)

* test: fix building pty test on Android (Saúl Ibarra Corretgé)

* doc: uv_buf_t members are not readonly (Saúl Ibarra Corretgé)

* doc: improve documentation on uv_alloc_cb (Saúl Ibarra Corretgé)

* fs: fix uv_fs_fstat on platforms using musl libc (Santiago Gimeno)

* doc: update supported fields for uv_rusage_t (Imran Iqbal)

* test: fix test-tcp-writealot flakiness on arm (Santiago Gimeno)

* test: fix fs_event_watch_dir flakiness on arm (Santiago Gimeno)

* unix: don't use alphasort in uv_fs_scandir() (Ben Noordhuis)

* doc: fix confusing doc of uv_tcp_nodelay (Bart Robinson)

* build,osx: fix warnings on tests compilation with gyp (Santiago
  Gimeno)

* doc: add ABI tracker link to README (Saúl Ibarra Corretgé)

* win,tty: fix uv_tty_set_mode race conditions (Bartosz Sosnowski)

* test: fix fs_fstat on Android (Vit Gottwald)

* win, test: fix fs_event_watch_dir_recursive (Bartosz Sosnowski)

* doc: add description of uv_handle_type (Vit Gottwald)

* build: use -pthreads for tests with autotools (Julien Gilli)

* win: fix leaky fs request buffer (Jason Ginchereau)

* doc: note buffer lifetime requirements in uv_write (Vladimír Čunát)

* doc: add reference to uv_update_time on uv_timer_start (Alex Hultman)

* win: fix winapi function pointer typedef syntax (Brad King)

* test: fix tcp_close_while_connecting CI failures (Ben Noordhuis)

* test: make threadpool_cancel_single deterministic (Ben Noordhuis)

* test: make threadpool saturation reliable (Ben Noordhuis)

* unix: don't malloc in uv_thread_create() (Ben Noordhuis)

* unix: don't include CoreServices globally on macOS (Brad King)

* unix,win: add uv_translate_sys_error() public API (Philippe
  Laferriere)

* win: remove unused static variables (Ben Noordhuis)

* win: silence -Wmaybe-uninitialized warning (Ben Noordhuis)

* signal: replace pthread_once with uv_once (Santiago Gimeno)

* test: fix sign-compare warning (Will Speak)

* common: fix unused variable warning (Brad King)
2016-10-24 09:52:33 -04:00
Saúl Ibarra Corretgé
b2e13b9f00 Revert "unix,win: simplify calculating polling timeout"
This reverts commit a35308306f.
The original commit introduced unforeseen regressions. See
https://github.com/libuv/libuv/pull/1096.

Fixes: https://github.com/libuv/libuv/pull/1096
PR-URL: https://github.com/libuv/libuv/pull/1102
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-10-21 11:51:54 -04:00
Brad King
0d586b7dd8 common: fix unused variable warning
The saved_data variable in uv_loop_close() is only used when
NDEBUG is defined. This commit makes the variable declaration
depend on NDEBUG as well.

PR-URL: https://github.com/libuv/libuv/pull/1093
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-10-19 13:43:33 -04:00
Will Speak
cded27b663 test: fix sign-compare warning
PR-URL: https://github.com/libuv/libuv/pull/1089
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-10-19 11:57:59 -04:00
Saúl Ibarra Corretgé
a35308306f unix,win: simplify calculating polling timeout
PR-URL: https://github.com/libuv/libuv/pull/1096
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2016-10-17 12:20:33 +01:00
Santiago Gimeno
31e5d665d5
signal: replace pthread_once with uv_once
So it aborts in case `pthread_once` fails.

PR-URL: https://github.com/libuv/libuv/pull/1098
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-10-17 12:13:59 +02:00
Ben Noordhuis
d5db277377 win: silence -Wmaybe-uninitialized warning
The compiler is wrong about it being used uninitialized but the warning
is sufficiently annoying that I decided to squelch it.

PR-URL: https://github.com/libuv/libuv/pull/1097
Reviewed-By: Andrius Bentkus <andrius.bentkus@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-10-17 11:16:28 +02:00
Ben Noordhuis
d00de9321b win: remove unused static variables
default_loop_struct and default_loop_ptr seem to have been overlooked
in commit 32747c7 ("win,unix: move loop functions which have identical
implementations".)

PR-URL: https://github.com/libuv/libuv/pull/1097
Reviewed-By: Andrius Bentkus <andrius.bentkus@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-10-17 11:16:24 +02:00
Philippe Laferriere
f1863dae6b unix,win: add uv_translate_sys_error() public API
uv_translate_sys_error() was a private function for Windows.
This commit adds an equivalent function on other platforms, and
exposes it as public API.

Exposing this is useful in scenarios where the application uses
both libuv functions and platform-specific system calls and wants
to report errors uniformly as libuv errors.

Fixes: https://github.com/libuv/libuv/issues/79
PR-URL: https://github.com/libuv/libuv/pull/1060
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-10-16 17:47:42 -04:00
Brad King
6b35ca8616 unix: don't include CoreServices globally on macOS
In unix/internal.h, CoreServices is included for AvailabilityMacros.h.
This commit just includes AvailabilityMacros.h directly instead.

PR-URL: https://github.com/libuv/libuv/pull/1092
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-10-16 13:35:47 -04:00
Ben Noordhuis
3064ae98e5 unix: don't malloc in uv_thread_create()
Simplify and optimize uv_thread_create() by casting the function pointer
to the prototype that pthread_create() wants.  Avoids the indirection of
an intermediate callback and heap-allocating custom state that is really
only there to placate the compiler.

PR-URL: https://github.com/libuv/libuv/pull/1094
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-10-16 19:28:17 +02:00
Ben Noordhuis
538782fbda test: make threadpool saturation reliable
Use a deterministic approach for saturating the threadpool instead of
depending on a timeout.  Should help reduce the flakiness of the CI.

PR-URL: https://github.com/libuv/libuv/pull/1014
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-10-14 02:06:55 +02:00
Ben Noordhuis
39baaa58b7 test: make threadpool_cancel_single deterministic
Saturate the thread pool before trying to post-and-cancel the work
request.  Before this commit we simply posted requests in a loop,
in the (sometimes idle) hope that one would get queued up instead
of being dispatched right away.

PR-URL: https://github.com/libuv/libuv/pull/1014
Refs: https://github.com/libuv/libuv/pull/1010
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-10-14 02:02:47 +02:00
Ben Noordhuis
e58f7535c8 test: fix tcp_close_while_connecting CI failures
The expected error is UV_ECANCELED but the test tries to connect to what
is basically an arbitrary address in the expectation that no network
path exists, so UV_ENETUNREACH is an equally plausible outcome.

This commit undoes the change from commit e994000 ("test: make
tcp_close_while_connecting more resilient") because I don't think
the connection ever actually succeeds.

PR-URL: https://github.com/libuv/libuv/pull/1048
Refs: https://github.com/libuv/libuv/pull/1005
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Imran Iqbal <imran@imraniqbal.org>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-10-14 01:57:15 +02:00
Brad King
cfc192212e win: fix winapi function pointer typedef syntax
Move the `PASCAL` calling convention marker from:

    typedef void PASCAL (*f)(...);

to the proper place for a calling convention in a function pointer type:

    typedef void (PASCAL *f)(...);

This is where the MS-provided winapi headers place it too.

PR-URL: https://github.com/libuv/libuv/pull/1075
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-10-14 07:30:08 +02:00
Alex Hultman
8ebecf6eab doc: add reference to uv_update_time on uv_timer_start
PR-URL: https://github.com/libuv/libuv/pull/1079
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-10-14 07:26:17 +02:00
Vladimír Čunát
1bcdca290d doc: note buffer lifetime requirements in uv_write
Fixes: https://github.com/libuv/libuv/issues/1072
PR-URL: https://github.com/libuv/libuv/pull/1074
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-10-09 13:00:09 -04:00
Jason Ginchereau
8221f9b305 win: fix leaky fs request buffer
When a large number of buffers (>4) is passed into `uv_fs_read()` or
`uv_fs_write()`, a new buffer is dynamically allocated to hold a copy
of the request data. This change adds code in `uv_fs_req_cleanup()`
to free that buffer if it was allocated.

Refs: https://github.com/nodejs/node/issues/7191
Fixes: https://github.com/libuv/libuv/issues/1069
PR-URL: https://github.com/libuv/libuv/pull/1070
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-09-27 09:36:57 +02:00
Julien Gilli
ca107b7f17 build: use -pthreads for tests with autotools
This prevents tests from using non-reentrant implementations of common
APIs (e.g `errno`) when using POSIX threads and building with autotools.
This is consistent with the way tests are builds when using gyp.

The problem was found when investigating tests failures on SmartOS for
one test added by https://github.com/libuv/libuv/pull/640. These
failures were due to that test using POSIX threads and also using a
non-reentrant errno global variable, instead of the reentrant `___errno`
function.

PR-URL: https://github.com/libuv/libuv/pull/1052
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-09-23 10:31:53 +01:00
Vit Gottwald
20c9c0105b doc: add description of uv_handle_type
Fixes: https://github.com/libuv/libuv/issues/1044
PR-URL: https://github.com/libuv/libuv/pull/1059
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-09-22 01:50:09 +02:00
Bartosz Sosnowski
468d44620a win, test: fix fs_event_watch_dir_recursive
Under Windows uv_fs_event_start with UV_FS_EVENT_RECURSIVE will report new file
creation and file deletion twice - once with the name of the file, and second
time with the name of the directory itself. This will filter out callbacks with
directory name, making observed callbacks count match expected values.

Fixes: https://github.com/libuv/libuv/issues/1009
PR-URL: https://github.com/libuv/libuv/pull/1061
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-09-20 00:14:36 +02:00
Vit Gottwald
fa81a1b2d7 test: fix fs_fstat on Android
Fixes: https://github.com/libuv/libuv/issues/1051
PR-URL: https://github.com/libuv/libuv/pull/1056
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-09-19 11:14:28 +01:00
Bartosz Sosnowski
84144036ce win,tty: fix uv_tty_set_mode race conditions
Additional synchronization is needed to ensure that the program
cannot modify the screen state while a line read is getting cancelled.

Also, we need to stop any pending reads *before* calling SetConsoleMode,
or a call to ReadConsole could start while the console is still in raw
mode.

Credit: @orangemocha - Alexis Campailla <orangemocha@nodejs.org>
Fixes: https://github.com/nodejs/node/issues/7837
PR-URL: https://github.com/libuv/libuv/pull/1054
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-09-18 10:15:05 +02:00
Saúl Ibarra Corretgé
79e80e0f12 doc: add ABI tracker link to README
PR-URL: https://github.com/libuv/libuv/pull/1053
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2016-09-18 10:10:24 +02:00
Santiago Gimeno
1a96fe3334 build,osx: fix warnings on tests compilation with gyp
Add `-Wno-long-long` to `WARNING_CFLAGS`.

PR-URL: https://github.com/libuv/libuv/pull/1049
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-09-15 18:45:39 +02:00