Commit Graph

4148 Commits

Author SHA1 Message Date
Saúl Ibarra Corretgé
9daef1c16d doc: use long GPG IDs in MAINTAINERS.md 2015-08-07 09:32:33 +02:00
Saúl Ibarra Corretgé
4bfaaff864 doc: add note about Windows binaries to the README 2015-08-05 22:34:25 +02:00
Saúl Ibarra Corretgé
dbca917bad doc: document the procedure for verifying releases
Refs: https://github.com/libuv/libuv/issues/409
2015-08-05 22:34:25 +02:00
Saúl Ibarra Corretgé
fbd61f6284 Add SHA to ChangeLog 2015-08-05 22:10:13 +02:00
Saúl Ibarra Corretgé
415a865d63 2015.08.06, Version 1.7.0 (Stable)
Changes since version 1.6.1:

* win,stream: add slot to remember CRT fd (Bert Belder)

* win,pipe: properly close when created from CRT fd (Bert Belder)

* win,pipe: don't close fd 0-2 (Bert Belder)

* win,tty: convert fd -> handle safely (Bert Belder)

* win,tty: properly close when created from CRT fd (Bert Belder)

* win,tty: don't close fd 0-2 (Bert Belder)

* win,fs: don't close fd 0-2 (Bert Belder)

* win: include "malloc.h" (Cheng Zhao)

* windows: MSVC 2015 has C99 inline (Jason Williams)

* dragonflybsd: fixes for nonblocking and cloexec (Michael Neumann)

* dragonflybsd: use sendfile(2) for uv_fs_sendfile (Michael Neumann)

* dragonflybsd: fix uv_exepath (Michael Neumann)

* win,fs: Fixes align(8) directive on mingw (Stefano Cristiano)

* unix, win: prevent replacing fd in uv_{udp,tcp,pipe}_t (Saúl Ibarra
  Corretgé)

* win: move logic to set socket non-inheritable to uv_tcp_set_socket
  (Saúl Ibarra Corretgé)

* unix, win: add ability to create tcp/udp sockets early (Saúl Ibarra
  Corretgé)

* test: retry select() on EINTR, honor milliseconds (Ben Noordhuis)

* unix: consolidate tcp and udp bind error (Saúl Ibarra Corretgé)

* test: conditionally skip udp_ipv6_multicast_join6 (heshamsafi)

* core: add UV_VERSION_HEX macro (Saúl Ibarra Corretgé)

* doc: add section with version-checking macros and functions (Saúl
  Ibarra Corretgé)

* tty: cleanup handle if uv_tty_init fails (Saúl Ibarra Corretgé)

* darwin: save a fd when FSEvents is used (Saúl Ibarra Corretgé)

* win: fix returning thread id in uv_thread_self (Saúl Ibarra Corretgé)

* common: use offsetof for QUEUE_DATA (Saúl Ibarra Corretgé)

* win: remove UV_HANDLE_CONNECTED (A. Hauptmann)

* docs: add Windows specific note for uv_fs_open (Saúl Ibarra Corretgé)

* doc: add note about uv_fs_scandir (Saúl Ibarra Corretgé)

* test,unix: reduce stack size of watchdog threads (Ben Noordhuis)

* win: add support for recursive file watching (Saúl Ibarra Corretgé)

* win,tty: support consoles with non-default colors (John McNamee)

* doc: add missing variable name (Yosuke Furukawa)

* stream: squelch ECONNRESET error if already closed (Santiago Gimeno)

* build: remove ancient condition from common.gypi (Saúl Ibarra
  Corretgé)

* tests: skip some tests when network is unreachable (Luca Bruno)

* build: proper support for android cross compilation (guworks)

* android: add missing include to pthread-fixes.c (RossBencina)

* test: fix compilation warning (Saúl Ibarra Corretgé)

* doc: add a note about uv_dirent_t.type (Saúl Ibarra Corretgé)

* win,test: fix shared library build (Saúl Ibarra Corretgé)

* test: fix compilation warning (Santiago Gimeno)

* build: add experimental Windows installer (Roger A. Light)

* threadpool: send signal only when queue is empty (chenttuuvv)

* aix: fix uv_exepath with relative paths (Richard Lau)

* build: fix version syntax in AppVeyor file (Saúl Ibarra Corretgé)

* unix: allow nbufs > IOV_MAX in uv_fs_{read,write} (ronkorving)
2015-08-05 22:10:09 +02:00
ronkorving
2bf782777f unix: allow nbufs > IOV_MAX in uv_fs_{read,write}
This allows writing and reading any amount of buffers,
regardless of what IOV_MAX may be defined as.

It also moves the IOV_MAX test from stream to core.

This is based on the excellent work of @bwijen in #269.

Refs: https://github.com/libuv/libuv/pull/269
PR-URL: https://github.com/libuv/libuv/pull/448
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-08-04 11:31:04 +02:00
Saúl Ibarra Corretgé
0b4f4889f1 build: fix version syntax in AppVeyor file
Use vLIBUV_VERSION.buildNUMBER syntax. This allows for easier parsing of
pre-releases:

v1.6.0.build1, v2.0.0-rc1.build2 etc.
2015-08-04 11:54:08 +02:00
Richard Lau
ab9776098e aix: fix uv_exepath with relative paths
uv_exepath() was not behaving correctly on AIX when the process was
invoked with a relative path.

The logic has been reworked to:

1) Use getargs() to retrieve the process arguments
2) Use realpath() to handle absolute and relative paths and
   symbolic links
3) Check that a match when searching the PATH is executable (if
   not search will continue)

PR-URL: https://github.com/libuv/libuv/pull/464
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-07-30 23:31:36 +02:00
chenttuuvv
0f1bdb6b13 threadpool: send signal only when queue is empty
PR-URL: https://github.com/libuv/libuv/pull/460
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-07-29 09:16:28 +02:00
Roger A. Light
350b2b446a build: add experimental Windows installer
Uses AppVeyor. Buidlds will be manually triggered when a tag is created
and uploaded to dist.libuv.org by a maintainer.

Refs: https://github.com/libuv/libuv/pull/359
PR-URL: https://github.com/libuv/libuv/pull/449
Reviewed-By: Bert Belder <bertbelder@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-07-28 09:52:42 +02:00
Santiago Gimeno
e18848059f test: fix compilation warning
file_prefix_in_subdir is only used in Windows and OSX. Fixes the
following warning, which shows up with Clang:

test/test-fs-event.c:40:19: warning: unused variable
'file_prefix_in_subdir' [-Wunused-const-variable]
static const char file_prefix_in_subdir[] = "subdir";

PR-URL: https://github.com/libuv/libuv/pull/450
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-07-28 09:49:56 +02:00
Saúl Ibarra Corretgé
01bbf6fb1c win,test: fix shared library build
Ifdef out the tests that rely on internal symbols when making a shared build.

PR-URL: https://github.com/libuv/libuv/pull/444
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-07-21 23:38:17 +02:00
Saúl Ibarra Corretgé
b3fde348e4 doc: add a note about uv_dirent_t.type
On Linux getting the type is only supported by some filesystems, check
getdents(2).
2015-07-17 09:26:08 +02:00
Saúl Ibarra Corretgé
085b877ccb test: fix compilation warning
fs_event_cb_dir_multi_file_in_subdir is only used in
fs_event_watch_dir_recursive test, which is only compiled in OSX and Windows.
2015-07-15 19:34:46 +02:00
RossBencina
3b0f85fd23 android: add missing include to pthread-fixes.c
PR-URL: https://github.com/libuv/libuv/pull/436
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-07-15 10:18:52 +02:00
guworks
d57c7e685f build: proper support for android cross compilation
The build script needs to properly specify the target as android
so the gyp build scripts can properly leverage cross compilation
using the android NDK.

PR-URL: https://github.com/libuv/libuv/pull/433
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-07-15 10:16:22 +02:00
Luca Bruno
5df06b3f2e tests: skip some tests when network is unreachable
Do not hard-fail network tests when libuv is built on
an isolated host/container.

Signed-off-by: Luca Bruno <lucab@debian.org>

PR-URL: https://github.com/libuv/libuv/pull/437
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-07-13 10:28:46 +02:00
Saúl Ibarra Corretgé
44485ce682 build: remove ancient condition from common.gypi
PR-URL: https://github.com/libuv/libuv/pull/435
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-07-10 12:53:40 +02:00
Santiago Gimeno
05a003a3f7 stream: squelch ECONNRESET error if already closed
Add new UV__POLLRDHUP event to be emitted when EPOLLRDHUP(in Linux) or
EV_EOF(in BSD / OSX) is detected and only if UV_READABLE is set.

When a read returns ECONNRESET after a UV__POLLRDHUP event, emit EOF instead
of the error.

Add tcp-squelch-connreset test. Not to be run on Windows as it returns
ECONNRESET error.

Fixes in test-poll and test-tcp-open so they pass after these changes.

PR-URL: https://github.com/libuv/libuv/pull/403
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-07-10 09:25:01 +02:00
Yosuke Furukawa
e110c46b81 doc: add missing variable name
PR-URL: https://github.com/libuv/libuv/pull/432
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-07-10 09:22:00 +02:00
John McNamee
517ade8ab2 win,tty: support consoles with non-default colors
Use the console text color set by the user rather than assuming the
Windows default (white foreground on black background).

PR-URL: https://github.com/libuv/libuv/pull/431
Reviewed-By: Bert Belder <bertbelder@gmail.com>
2015-07-09 20:21:28 -07:00
Saúl Ibarra Corretgé
188e0e94ac win: add support for recursive file watching
Original patch by @ghostoy, modified by @bpasero and yours truly.

Refs: https://github.com/joyent/libuv/pull/1473
Refs: https://github.com/libuv/libuv/pull/198
PR-URL: https://github.com/libuv/libuv/pull/421
Reviewed-By: Bert Belder <bertbelder@gmail.com>
2015-07-08 23:40:47 +02:00
Ben Noordhuis
f3613e5082 test,unix: reduce stack size of watchdog threads
Some 32 bits architectures, linux/mips and linux/mipsel in particular,
suffer from address space fragmentation when spawning many threads
with the default 8 MB stack size.  The watchdog threads don't need
much stack space, all they do is sleep until the monitored process
exits, so lower it to 256 kB.

Fixes: https://github.com/libuv/libuv/issues/408
PR-URL: https://github.com/libuv/libuv/pull/429
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-07-08 21:53:20 +02:00
Saúl Ibarra Corretgé
c48950ed04 doc: add note about uv_fs_scandir
The '.' and '..' entries are always skipped on Unix systems.

Refs: https://github.com/libuv/libuv/issues/426
PR-URL: https://github.com/libuv/libuv/pull/427
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-07-08 22:39:46 +02:00
Saúl Ibarra Corretgé
ac89bb4d30 docs: add Windows specific note for uv_fs_open 2015-07-07 09:55:52 +02:00
A. Hauptmann
15e4dedace win: remove UV_HANDLE_CONNECTED
UV_HANDLE_CONNECTED was defined, but never used anywhere - outside this if
condition inside uv__stdio_create. So this test can't be true.
UV_HANDLE_CONNECTION was meant.

A test was also added verifying the behaviour.

PR-URL: https://github.com/libuv/libuv/pull/404
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-07-07 09:45:48 +02:00
Saúl Ibarra Corretgé
e791e4532e common: use offsetof for QUEUE_DATA
Silences the following runtime errors when compiling UBSan:

../src/unix/linux-core.c:181:9: runtime error: member access within null
pointer of type 'uv__io_t' (aka 'struct uv__io_s')
../src/unix/process.c:67:15: runtime error: member access within null
pointer of type 'uv_process_t' (aka 'struct uv_process_s')
../src/unix/process.c:91:15: runtime error: member access within null
pointer of type 'uv_process_t' (aka 'struct uv_process_s')
...

PR-URL: https://github.com/libuv/libuv/pull/422
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-07-03 11:38:24 +02:00
Saúl Ibarra Corretgé
a979e76eff win: fix returning thread id in uv_thread_self
The main thread does not have the thread id TLS created.

Fixes: https://github.com/joyent/node/issues/25602
PR-URL: https://github.com/libuv/libuv/pull/418
Reviewed-By: Alexis Campailla <alexis@janeasystems.com>
Reviewed-By: Bert Belder <bertbelder@gmail.com>
2015-07-02 00:18:32 +02:00
Saúl Ibarra Corretgé
7980f1359d darwin: save a fd when FSEvents is used
Refs: https://github.com/libuv/libuv/issues/387
PR-URL: https://github.com/libuv/libuv/pull/413
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
2015-06-30 12:15:41 +02:00
Saúl Ibarra Corretgé
60fca01705 tty: cleanup handle if uv_tty_init fails
Once we are past uv__stream_init, the handle has been added to
loop->handle_queue, it needs to be undone in case of failure.

PR-URL: https://github.com/libuv/libuv/pull/414
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-30 01:25:53 +02:00
Saúl Ibarra Corretgé
c1fe25f654 doc: add section with version-checking macros and functions 2015-06-29 23:09:14 +02:00
Saúl Ibarra Corretgé
ede94898aa core: add UV_VERSION_HEX macro
PR-URL: https://github.com/libuv/libuv/pull/412
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-29 23:08:41 +02:00
heshamsafi
ca3ec90c6c test: conditionally skip udp_ipv6_multicast_join6
Skip udp_ipv6_multicast_join6 test if no ipv6 multicast route
is defined on ff02::1

Reefs: https://github.com/joyent/libuv/issues/1401#issuecomment-11570984
PR-URL: https://github.com/libuv/libuv/pull/411
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-06-29 09:35:26 +02:00
Saúl Ibarra Corretgé
d377435b5e unix: consolidate tcp and udp bind error
OSX, other BSDs and SunoS fail with EAFNOSUPPORT when binding a socket created
with AF_INET to an AF_INET6 address or vice versa.

PR-URL: https://github.com/libuv/libuv/pull/407
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-28 11:53:52 +02:00
Ben Noordhuis
af20bb6830 test: retry select() on EINTR, honor milliseconds
Make the test runner code that waits for other processes to terminate
retry the select() system call on EINTR and take elapsed time into
account.

A small side effect of this change is that millisecond timeout values
are now honored.

PR-URL: https://github.com/libuv/libuv/pull/410
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-06-26 16:37:22 +02:00
Saúl Ibarra Corretgé
f8f59824c4 unix, win: add ability to create tcp/udp sockets early
Introduce two new APIs:

int uv_tcp_init_ex(uv_loop_t*, uv_tcp_t* handle, int flags)
int uv_udp_init_ex(uv_loop_t*, uv_udp_t* handle, int flags)

The lower 8 bits of the flags field are used for the socket domain.
AF_INET, AF_INET6 and AF_UNSPEC are supported. If AF_UNSPEC is specified
the socket is created lazily, just like uv_{tcp,udp}_init.

Some Windows notes:

getsockname fails with WSAEINVAL if the socket is not bound. This could
potentially be improved by detecting the socket family and filling
the sockaddr_in/6 struct manually.

bind returns WSAEFAULT if we try to bind a socket to the wrong family.
Unix returns EINVAL.

PR-URL: https://github.com/libuv/libuv/pull/400
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-19 09:37:19 +02:00
Saúl Ibarra Corretgé
2dddd565fd win: move logic to set socket non-inheritable to uv_tcp_set_socket
PR-URL: https://github.com/libuv/libuv/pull/400
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-19 09:37:08 +02:00
Saúl Ibarra Corretgé
fb5df542ac unix, win: prevent replacing fd in uv_{udp,tcp,pipe}_t
PR-URL: https://github.com/libuv/libuv/pull/400
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-19 09:36:41 +02:00
Stefano Cristiano
70bbfa0e00 win,fs: Fixes align(8) directive on mingw
Fixes: https://github.com/libuv/libuv/issues/190
PR-URL: https://github.com/libuv/libuv/pull/398
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-06-16 22:59:51 +02:00
Michael Neumann
c8eebc93a9 dragonflybsd: fix uv_exepath
This fixes a bug I have noticed with nodejs:

> cat test.js
  console.log(process.execPath);

> node test.js (on DragonFly)
  node test.js

> node test.js (on Linux)
  node

PR-URL: https://github.com/libuv/libuv/pull/399
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-06-16 22:54:33 +02:00
Michael Neumann
db8c812a3d dragonflybsd: use sendfile(2) for uv_fs_sendfile
PR-URL: https://github.com/libuv/libuv/pull/399
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-06-16 22:54:33 +02:00
Michael Neumann
94ba71b9eb dragonflybsd: fixes for nonblocking and cloexec
Use the same code path as FreeBSD does.

PR-URL: https://github.com/libuv/libuv/pull/399
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-06-16 22:54:27 +02:00
Peter Jas
514c0b3d06 windows: MSVC 2015 has C99 inline
Prior to MSVC 2015, the standard C99 `inline` keyword was missing,
added a compiler version check and disabled the inline replacement for
MSVC >= 2015 in test/task.h.

Refs: https://github.com/libuv/libuv/pull/341
PR-URL: https://github.com/libuv/libuv/pull/369
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-06-15 10:16:52 +02:00
Cheng Zhao
c0c26a0f07 win: include "malloc.h"
As stated in malloc's docs[1], the malloc.h is required for using the
malloc function, and from malloc.h's source code (which can be found
under installed VS), malloc is defined as a macro that has different
behaviors under different configurations.

So using malloc without including malloc.h is very dangerous, for
certain build configurations crashes can happen when writing to memory
allocated by malloc.

[1]: https://msdn.microsoft.com/en-us/library/6ewkz86d.aspx

PR-URL: https://github.com/libuv/libuv/pull/395
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Bert Belder <bertbelder@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-06-15 09:50:20 +02:00
Bert Belder
c619f37c39 win,fs: don't close fd 0-2
PR-URL: https://github.com/libuv/libuv/pull/396
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-06-14 16:22:32 -07:00
Bert Belder
f6fc5dd57d win,tty: don't close fd 0-2
PR-URL: https://github.com/libuv/libuv/pull/396
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-06-14 16:22:31 -07:00
Bert Belder
164fbda67e win,tty: properly close when created from CRT fd
When a Windows handle was opened from a CRT fd, it needs to be closed
with `close()` instead of `CloseHandle()`.

PR-URL: https://github.com/libuv/libuv/pull/396
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-06-14 16:22:31 -07:00
Bert Belder
0bad50a09c win,tty: convert fd -> handle safely
_get_osfhandle() may throw if it's used to convert a non-open file
descriptor to a Windows HANDLE. Use the safe uv__get_osfhandle instead.

PR-URL: https://github.com/libuv/libuv/pull/396
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-06-14 16:22:30 -07:00
Bert Belder
90fb8cb0ab win,pipe: don't close fd 0-2
PR-URL: https://github.com/libuv/libuv/pull/396
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-06-14 16:22:30 -07:00
Bert Belder
4ed29c2498 win,pipe: properly close when created from CRT fd
When a Windows handle was opened from a CRT fd, it needs to be closed
with `close()` instead of `CloseHandle()`.

PR-URL: https://github.com/libuv/libuv/pull/396
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-06-14 16:22:29 -07:00