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>
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>
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>
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>
`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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
- 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>