Commit Graph

4148 Commits

Author SHA1 Message Date
cjihrig
77c8abae33 win: compare entire filename in watch events
This commit causes Window file watching events to compare the
entire file path when filtering events. This fixes a bug where
incomplete path comparisons would cause invalid events to be
raised.

Refs: https://github.com/libuv/libuv/pull/682
PR-URL: https://github.com/libuv/libuv/pull/924
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-06-24 10:36:04 -04:00
Ben Noordhuis
34ee25734f unix: don't convert stat buffer when syscall fails
Don't call uv__to_stat() when the stat/fstat/lstat system call fails;
the stack-allocated buffer contains only garbage in that case.

Not a very serious bug it's technically undefined behavior and it made
valgrind squawk.

Introduced in commit 499c7976 ("unix, windows: nanosecond resolution
for uv_fs_[fl]stat").

PR-URL: https://github.com/libuv/libuv/pull/921
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-06-22 17:49:28 +02:00
Saúl Ibarra Corretgé
cdccd4f990 doc: clarify callbacks won't be called in error case
PR-URL: https://github.com/libuv/libuv/pull/918
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-06-22 01:23:12 +02:00
Brian Maher
d75e334e34 sunos: set phys_addr of interface_address using ARP
If getifaddrs() returns an all zero ifa_addr field, then use ARP to
set the phys_addr field of the uv_interface_address_t on the sunos
platform.

PR-URL: https://github.com/libuv/libuv/pull/907
Reviewed-By: Imran Iqbal <imran@imraniqbal.org>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-06-22 01:19:04 +02:00
Luca Bruno
7b9e25a9a9 test: skip tty_pty test if pty is not available
Do not let `tty_pty` test fail if no terminals are available
to `openpty()`.

PR-URL: https://github.com/libuv/libuv/pull/919
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-06-21 12:32:00 -04:00
Saúl Ibarra Corretgé
2fc54807fc unix: remove unneeded TODO note
It's already documented in
http://docs.libuv.org/en/v1.x/stream.html#c.uv_accept

PR-URL: https://github.com/libuv/libuv/pull/916
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Imran Iqbal <imran@imraniqbal.org>
2016-06-16 09:51:02 +02:00
Imran Iqbal
9940b84041 build: check for warnings for -fvisibility=hidden
Fixes: https://github.com/libuv/libuv/issues/911
PR-URL: https://github.com/libuv/libuv/pull/912
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-06-15 17:22:35 -04:00
Imran Iqbal
fcfe230130 unix,fs: use uint64_t instead of unsigned long
`unsigned long` is not guaranteed to be 8 bytes long. This prevents
overflow errors from occurring as seen in issue #913

Fixes: https://github.com/libuv/libuv/issues/913
PR-URL: https://github.com/libuv/libuv/pull/914
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-06-15 11:41:54 -04:00
Imran Iqbal
e2da056698 doc: update coding style link
PR-URL: https://github.com/libuv/libuv/pull/909
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-06-13 14:27:29 -04:00
Pierre-Marie de Rodat
23043a7e95 doc: fix stream typos
PR-URL: https://github.com/libuv/libuv/pull/910
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-06-13 09:38:09 -04:00
Ben Noordhuis
7e7e221260 test: remove unused RETURN_TODO macro
PR-URL: https://github.com/libuv/libuv/pull/898
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-06-10 10:08:15 +02:00
Ben Noordhuis
b936ace934 test: improve formatting of diagnostic messages
Put a space after the '#' and handle messages with newlines.

PR-URL: https://github.com/libuv/libuv/pull/898
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-06-10 10:08:13 +02:00
Ben Noordhuis
dd9f751ead test: don't dump output for skipped tests
A skipped test already prints a diagnostic.  Dumping its output just
prints the same message twice.

PR-URL: https://github.com/libuv/libuv/pull/898
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-06-10 10:08:11 +02:00
Ben Noordhuis
cc1d38ea93 test: make tap output the default
With the non-tap output, it's sometimes difficult to distinguish skipped
tests from test failures.

PR-URL: https://github.com/libuv/libuv/pull/898
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-06-10 10:07:45 +02:00
Michael Neumann
96b37293a9 unix: correctly detect named pipes on DragonFly
This fixes test-stdio-over-pipes and test-pipe-sendmsg test cases.

~~~~
    Assertion failed in test/test-stdio-over-pipes.c on line 56: term_signal == 0
    Assertion failed in test/test-pipe-sendmsg.c on line 86: pending == UV_NAMED_PIPE
~~~~

This fixes a longstanding issue with nodejs on DragonFly, which was
triggered whenever spawning a process and pipes were involed.

PR-URL: https://github.com/libuv/libuv/pull/884
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Imran Iqbal <imran@imraniqbal.org>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-06-09 22:13:53 +02:00
Michael Neumann
0c82efa4d5 build: fix build on DragonFly
PR-URL: https://github.com/libuv/libuv/pull/884
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Imran Iqbal <imran@imraniqbal.org>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-06-09 22:12:17 +02:00
Nicolas Cavallari
c4e917790e linux-core: fix uv_get_total/free_memory on uclibc
The _SC_PHYS_PAGES and _SC_AVPHYS_PAGES are not POSIX sysconf values, so
the standart C libraries have no obligation to support it, even on
Linux.  Use the Linux sysinfo() system call instead.

PR-URL: https://github.com/libuv/libuv/pull/901
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-06-09 22:05:45 +02:00
Imran Iqbal
5af420669a
doc: add iWuzHere GPG ID
PR-URL: https://github.com/libuv/libuv/pull/902
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-06-08 18:38:04 -04:00
Kári Tristan Helgason
89f01a41ab test: silence build warnings
PR-URL: https://github.com/libuv/libuv/pull/893
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-06-03 01:18:17 +02:00
Imran Iqbal
71bd07e588 doc: update docs with AIX related information
Fixes: https://github.com/libuv/libuv/issues/882
PR-URL: https://github.com/libuv/libuv/pull/896
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-06-02 10:21:15 -04:00
Imran Iqbal
422bc5f168 doc: add Imran Iqbal (iWuzHere) to maintainers
PR-URL: https://github.com/libuv/libuv/pull/894
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-05-30 14:07:43 -04:00
Saúl Ibarra Corretgé
193a6f9b93 unix: ignore EINPROGRESS in uv__close
It's just an indicator that the operation will happen later, so return
success.

PR-URL: https://github.com/libuv/libuv/pull/892
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-05-29 20:37:05 +02:00
Jason Ginchereau
399e2c8140 win: support sub-second precision in uv_fs_futimes()
Fixes: https://github.com/libuv/libuv/issues/800
PR-URL: https://github.com/libuv/libuv/pull/849
Reviewed-by: Bert Belder <bertbelder@gmail.com>
2016-05-29 11:58:46 +02:00
Miodrag Milanovic
6cf935b1ea win,pipe: fixed formatting, DWORD is long unsigned
PR-URL: https://github.com/libuv/libuv/pull/890
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-05-28 12:58:20 +02:00
Saúl Ibarra Corretgé
8b3176933d doc: add licensing information to README
PR-URL: https://github.com/libuv/libuv/pull/887
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2016-05-28 12:55:58 +02:00
Saúl Ibarra Corretgé
acc0175c6c license: add license text we've been using for a while
PR-URL: https://github.com/libuv/libuv/pull/887
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2016-05-28 12:55:46 +02:00
Saúl Ibarra Corretgé
f869136646 license: libuv is no longer a Node project
PR-URL: https://github.com/libuv/libuv/pull/887
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2016-05-28 12:55:00 +02:00
Santiago Gimeno
51d660de00 test: fix test_close_accept flakiness on Centos5
It is not guaranteed which stream will read the data first.

PR-URL: https://github.com/libuv/libuv/pull/807
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-05-28 12:50:05 +02:00
Saúl Ibarra Corretgé
bd0e8e82de doc: fix generation the first time livehtml runs
PR-URL: https://github.com/libuv/libuv/pull/886
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-05-26 09:48:28 +02:00
Ben Noordhuis
c5c419f7c8 unix: allow nesting of kqueue fds in uv_poll_start
kqueue file descriptors don't support ioctl(FIONBIO) (or any other ioctl
for that matter) so retry using fcntl(F_GETFL) + fcntl(F_SETFL) when we
receive a ENOTTY error.

Fixes: https://github.com/libuv/libuv/issues/883
PR-URL: https://github.com/libuv/libuv/pull/885
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-05-24 17:12:31 +02:00
Saúl Ibarra Corretgé
c0fdc7102b darwin: fix setting fd to non-blocking in select(() trick
When the select trick is used fd is replaced with the fake fd (one end
of the socketpair) so we're not setting the original fd in non-blocking
mode.

Refs: https://github.com/nodejs/node/issues/6456#issuecomment-220018822
PR-URL: https://github.com/libuv/libuv/pull/879
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2016-05-24 13:59:50 +01:00
Saúl Ibarra Corretgé
36a024de05 win,build: fix compilation on old Windows / MSVC
Observed on Windows XP with Visual Studio 2008.

PR-URL: https://github.com/libuv/libuv/pull/880
Reviewed-By: Alexis Campailla <orangemocha@nodejs.org>
2016-05-20 10:26:05 +02:00
cjihrig
c5622a1c4f doc: add cjihrig GPG ID
PR-URL: https://github.com/libuv/libuv/pull/877
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-05-18 11:37:36 -04:00
Saúl Ibarra Corretgé
67f4d1c531 Now working on version 1.9.2 2016-05-16 23:49:30 +02:00
Saúl Ibarra Corretgé
fe29921454 Add SHA to ChangeLog 2016-05-16 23:22:29 +02:00
Saúl Ibarra Corretgé
d989902ac6 2016.05.17, Version 1.9.1 (Stable)
Changes since version 1.9.0:

* test: handle root home directories (cjihrig)

* unix: implement uv__fs_futime for AIX 7.1 (Imran Iqbal)

* test: skip early bind tests if no IPv6 is supported (Saúl Ibarra
  Corretgé)

* win: fix var declaration to be C89 compliant (Michael Fero)

* unix: use POLL{IN,OUT,etc} constants directly (Ben Noordhuis)

* doc: add ability to live reload and regenerate HTML (Saúl Ibarra
  Corretgé)

* Revert "win,build: remove unused build defines" (cjihrig)

* linux: fix fd leaks in uv_cpu_info() error paths (Ben Noordhuis)

* linux: don't abort on malformed /proc/stat (Ben Noordhuis)

* linux: fix long lines in linux-core.c (Ben Noordhuis)

* test: fix fs_event_watch_file_current_dir for AIX (Imran Iqbal)

* unix,fs: code cleanup of uv_fs_event_start for AIX (Imran Iqbal)

* unix: delay signal handling until after normal i/o (Ben Noordhuis)

* android: pthread_sigmask() does not set errno (Oguz Bastemur)

* win: work around sharepoint scandir bug (Ben Noordhuis)

* unix: guard against clobbering errno in uv__free() (Ben Noordhuis)

* unix: remove unneeded SAVE_ERRNO wrappers (Ben Noordhuis)

* test: skip fs_event_close_in_callback on AIX (Imran Iqbal)

* win: add maxrss, pagefaults to uv_getrusage() (Robert Jefe Lindstaedt)

* test: set a big send buffer size for tcp_write_queue_order (Andrius
  Bentkus)

* unix: error on realpath if PATH_MAX is undefined (Myles Borins)

* unix: fix bug in barrier fallback implementation (Kári Tristan
  Helgason)

* build: bump android ndk version (Kári Tristan Helgason)

* build: always compile with -fvisibility=hidden (Ben Noordhuis)

* test: fix -Wformat warnings in platform test (Ben Noordhuis)

* win: clarify fsevents handling code (Saúl Ibarra Corretgé)

* test: fix POLLHDRUP related failures for AIX (Imran Iqbal)

* build, mingw: set LIBS in configure.ac (Tony Theodore)

* win: improve uv__convert_utf16_to_utf8 (Saúl Ibarra Corretgé)

* win: simplified UTF16 -> UTF8 conversions (Saúl Ibarra Corretgé)

* win: remove unneeded condition (Saúl Ibarra Corretgé)

* darwin: work around condition variable kernel bug (Ben Noordhuis)

* darwin: make thread stack multiple of page size (Ben Noordhuis)

* build,win: rename platform to msbuild_platform (João Reis)

* gitignore: ignore VS temporary database files (João Reis)

* test: skip emfile on AIX (Imran Iqbal)

* unix: use system allocator for scandir() (cjihrig)

* common: release uv_fs_scandir() array (cjihrig)

* win: call uv__fs_scandir_cleanup() (cjihrig)

* win,tty: fix read stop in line mode (João Reis)

* win,tty: don't duplicate handle for line reads (João Reis)

* win,tty: restore cursor after canceling line read (Alexis Campailla)
2016-05-16 23:22:19 +02:00
Alexis Campailla
9eb1311971 win,tty: restore cursor after canceling line read
When we send VK_RETURN to make ReadConsole return, a spurious new line
is echoed to the screen. This is pretty visible in Node.js, since it
calls uv_tty_read_start() and uv_tty_read_stop() in rapid succession
during startup.

With this change, we save the screen state just before sending
VK_RETURN, and restore the cursor position as soon as ReadConsole
returns.

PR-URL: https://github.com/libuv/libuv/pull/866
Reviewed-by: Bert Belder <bertbelder@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-05-16 23:05:54 +02:00
João Reis
349aa6c0dd win,tty: don't duplicate handle for line reads
Since we cancel ReadConsole by sending a newline, the duplicate
handle is no longer necessary.

PR-URL: https://github.com/libuv/libuv/pull/866
Reviewed-by: Bert Belder <bertbelder@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-05-16 23:05:50 +02:00
João Reis
e51442bbc9 win,tty: fix read stop in line mode
Closing the handle does not make ReadConsoleW exit reliably on
Windows 7 and above. Thus, after switching from line to raw mode,
keypresses were held until enter was pressed. This makes ReadConsoleW
exit by writing a return keypress to its input buffer, similar to
what was already done for raw mode.

Fixes: https://github.com/libuv/libuv/issues/852
PR-URL: https://github.com/libuv/libuv/pull/866
Reviewed-by: Bert Belder <bertbelder@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-05-16 23:05:35 +02:00
cjihrig
4e4407b17e win: call uv__fs_scandir_cleanup()
This commit adds a previously missing call to
uv__fs_scandir_cleanup() to uv_fs_req_cleanup(). This better
aligns the Windows and Unix implementations.

Fixes: https://github.com/libuv/libuv/issues/873
PR-URL: https://github.com/libuv/libuv/pull/874
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-05-16 14:10:06 -04:00
cjihrig
40e7a9867d common: release uv_fs_scandir() array
uv__fs_scandir_cleanup() releases individual directory entries,
but not the container array. This commit frees the array as well.

Fixes: https://github.com/libuv/libuv/issues/873
PR-URL: https://github.com/libuv/libuv/pull/874
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-05-16 14:09:58 -04:00
cjihrig
4fa89fbc61 unix: use system allocator for scandir()
On unix, scandir() uses the system allocator to allocate memory.
This commit releases the memory with free() instead of uv__free().
uv__free() is still used on Windows, which uses uv__malloc() to
request the memory.

Fixes: https://github.com/libuv/libuv/issues/873
PR-URL: https://github.com/libuv/libuv/pull/874
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-05-16 14:08:41 -04:00
Imran Iqbal
a1bd1ee803 test: skip emfile on AIX
On AIX, if a 'accept' call fails ECONNRESET is set on the socket which
causes uv__emfile_trick to not work as intended and this test to fail.

Fixes: https://github.com/libuv/libuv/issues/845
PR-URL: https://github.com/libuv/libuv/pull/870
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-05-12 23:11:04 +02:00
João Reis
31a0132a68 gitignore: ignore VS temporary database files
Visual Studio 2015 uses a new database engine, creating temporary
files that should be ignored.

PR-URL: https://github.com/libuv/libuv/pull/869
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-05-12 19:16:06 +02:00
João Reis
11e93aaf53 build,win: rename platform to msbuild_platform
This variable is used to select 32 or 64 bit builds when invoking
MSBuild. The Visual C++ Build Tools also use the `platform` variable
name, resulting in a conflict when vcvarsall.bat is called. Thus, it
is necessary to rename it.

Ref: https://github.com/libuv/libuv/issues/839
PR-URL: https://github.com/libuv/libuv/pull/868
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-05-12 19:14:12 +02:00
Ben Noordhuis
28d160f3de darwin: make thread stack multiple of page size
pthread_attr_setstacksize() expects that the stack size is a multiple of
the page size so make sure that it is.

Fixes a regression introduced in commit 3db07cc ("osx: set the default
thread stack size to RLIMIT_STACK") that made the program abort under
certain configurations; GNU Emacs on OS X apparently sets RLIMIT_STACK
to odd values when executing child processes.

Fixes: https://github.com/nodejs/node/issues/6563
PR-URL: https://github.com/libuv/libuv/pull/864
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-05-10 18:19:46 +02:00
Ben Noordhuis
a8840fb347 darwin: work around condition variable kernel bug
It has been reported that destroying condition variables that have been
signalled but not waited on can sometimes result in application crashes.
See https://codereview.chromium.org/1323293005.

PR-URL: https://github.com/libuv/libuv/pull/860
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-05-06 22:26:22 +02:00
Saúl Ibarra Corretgé
e397caa3a6 win: remove unneeded condition
The size is checked beforehand, no need to check it again.

PR-URL: https://github.com/libuv/libuv/pull/859
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-05-06 09:54:20 +02:00
Saúl Ibarra Corretgé
46d84eae28 win: simplified UTF16 -> UTF8 conversions
PR-URL: https://github.com/libuv/libuv/pull/859
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-05-06 09:54:07 +02:00
Saúl Ibarra Corretgé
4c945f4936 win: improve uv__convert_utf16_to_utf8
- take a size parameter
- always null terminate the buffer
- nullify the output parameter in case of error

PR-URL: https://github.com/libuv/libuv/pull/859
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-05-06 09:53:27 +02:00