Commit Graph

898 Commits

Author SHA1 Message Date
cjihrig
8aa5636ec7
2020.01.13, Version 1.34.1 (Stable)
Changes since version 1.34.0:

* unix: fix -Wstrict-aliasing compiler warning (Ben Noordhuis)

* unix: cache address of dlsym("mkostemp") (Ben Noordhuis)

* build: remove -pedantic from compiler flags (Ben Noordhuis)

* Revert "darwin: assume pthread_setname_np() is available" (Ben
  Noordhuis)

* Revert "darwin: speed up uv_set_process_title()" (Ben Noordhuis)

* darwin: assume pthread_setname_np() is available (Ben Noordhuis)

* ibmi: fix the false isatty() issue on IBMi (Xu Meng)

* test: fix test failure under NetBSD and OpenBSD (David Carlier)

* test: skip some test cases on IBMi (Xu Meng)

* test: skip uv_(get|set)_process_title on IBMi (Xu Meng)

* doc: remove binaries for Windows from README (Richard Lau)

* unix: fix -Wunused-but-set-variable warning (George Zhao)

* unix: pass sysctl size arg using ARRAY_SIZE macro (David Carlier)

* test: disallow running the test suite as root (cjihrig)

* unix: suppress -Waddress-of-packed-member warning (Ben Noordhuis)

* misc: make more tags "not-stale" (Jameson Nash)

* test: fix pthread memory leak (Trevor Norris)

* docs: delete socks5-proxy sample (Jameson Nash)

* ibmi: fix the CMSG length issue (Xu Meng)

* docs: fix formatting (Jameson Nash)

* unix: squelch fchmod() EPERM on CIFS share (Ben Noordhuis)

* docs: fix linkcheck (Jameson Nash)

* docs: switch from linux.die.net to man7.org (Jameson Nash)

* win: remove abort when non-IFS LSP detection fails (virtualyw)

* docs: clarify that uv_pipe_t is a pipe (Jameson Nash)

* win,tty: avoid regressions in utf-8 handling (Jameson Nash)

* win: remove bad assert in uv_loop_close (Jameson Nash)

* test: fix -fno-common build errors (Ben Noordhuis)

* build: turn on -fno-common to catch regressions (Ben Noordhuis)

* test: fix fs birth time test failure (Ben Noordhuis)

* tty,unix: avoid affecting controlling TTY (Jameson Nash)
2020-01-12 18:33:21 -05:00
cjihrig
d01f050099
Now working on version 1.34.1
Fixes: https://github.com/libuv/libuv/issues/2538
2019-12-03 22:13:41 -05:00
cjihrig
15ae750151
2019.12.05, Version 1.34.0 (Stable)
Changes since version 1.33.1:

* unix: move random-sysctl to random-sysctl-linux (nia)

* netbsd: use KERN_ARND sysctl to get entropy (nia)

* unix: refactor uv__fs_copyfile() logic (cjihrig)

* build: fix android build, add missing sources (Ben Noordhuis)

* build: fix android build, fix symbol redefinition (Ben Noordhuis)

* build: fix android autotools build (Ben Noordhuis)

* fs: handle non-functional statx system call (Milad Farazmand)

* unix,win: add uv_sleep() (cjihrig)

* doc: add richardlau to maintainers (Richard Lau)

* aix: fix netmask for IPv6 (Richard Lau)

* aix: clean up after errors in uv_interface_addresses() (Richard Lau)

* aix: fix setting of physical addresses (Richard Lau)

* fs: add uv_fs_mkstemp (Saúl Ibarra Corretgé)

* unix: switch uv_sleep() to nanosleep() (Ben Noordhuis)

* unix: retry on EINTR in uv_sleep() (Ben Noordhuis)

* zos: fix nanosleep() emulation (Ben Noordhuis)
2019-12-03 22:11:28 -05:00
Saúl Ibarra Corretgé
5500253cac fs: add uv_fs_mkstemp
Thanks to Andreas Hauptmann and Bastian Schmitz for their earlier work.

Supersedes: https://github.com/libuv/libuv/pull/2074
Closes: https://github.com/libuv/libuv/issues/2555
PR-URL: https://github.com/libuv/libuv/pull/2557
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-12-03 09:03:50 +01:00
cjihrig
8c73eee23f
unix,win: add uv_sleep()
This commit exposes the uv_sleep() function that previously
only existed in the test runner.

PR-URL: https://github.com/libuv/libuv/pull/2548
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-11-25 12:13:39 -05:00
cjihrig
747a0f34d7
Now working on version 1.33.2
Fixes: https://github.com/libuv/libuv/issues/2525
2019-10-19 16:40:16 -05:00
cjihrig
07ad32138f
2019.10.20, Version 1.33.1 (Stable)
Changes since version 1.33.0:

* linux: fix arm64 SYS__sysctl build breakage (Ben Noordhuis)
2019-10-19 16:32:27 -05:00
cjihrig
cb7e5a6aff
Now working on version 1.33.1
Fixes: https://github.com/libuv/libuv/issues/2491
2019-10-16 14:55:35 -04:00
cjihrig
e56e42e931
2019.10.17, Version 1.33.0 (Stable)
Changes since version 1.32.0:

* Revert "linux: drop code path for epoll_pwait-less kernels" (Yang Yu)

* build: fix build error with __ANDROID_API__ < 21 (Yang Yu)

* win: fix reading hidden env vars (Anna Henningsen)

* unix,win: add uv_random() (Ben Noordhuis)

* win: simplify mkdtemp (Saúl Ibarra Corretgé)

* docs: fix literal-includes in User Guide (Nhan Khong)

* win, tty: fix problem of receiving unexpected SIGWINCH (erw7)

* unix: fix {Net,Open}BSD build (David Carlier)

* win,mingw: Fix undefined MCAST_* constants (Crunkle)

* build: Add link for test/fixtures/lorem_ipsum.txt (Andrew Paprocki)

* fs: use statvfs in uv__fs_statfs() for Haiku (Calvin Hill)

* fsevents: stop using fsevents to watch files (Jameson Nash)

* fsevents: regression in watching / (Jameson Nash)

* build,cmake: don't try to detect a C++ compiler (Isabella Muerte)

* build: fix build warning on cygwin (MaYuming)

* unix: set sin_len and sin6_len (Ouyang Yadong)

* test: fix order of operations in test (cjihrig)

* doc: improve uv_fs_readdir() cleanup docs (cjihrig)

* build: remove duplicated test in build files (ZYSzys)

* android: enable getentropy on Android >= 28 (David Carlier)

* android: fix build (David Carlier)

* darwin: speed up uv_set_process_title() (Ben Noordhuis)

* darwin: assume pthread_setname_np() is available (Ben Noordhuis)

* unix,udp: ensure addr is non-null (Jameson Nash)

* win,tty: add uv_tty_{get,set}_vterm_state (erw7)

* win: fix uv_statfs_t leak in uv_fs_statfs() (Ryan Liptak)

* build: install files on windows via cmake (Carl Lei)

* darwin,test: include AvailabilityMacros.h (Saúl Ibarra Corretgé)

* darwin,test: update loop time after sleeping (Saúl Ibarra Corretgé)

* doc: remove old FreeBSD 9 related note (Saúl Ibarra Corretgé)

* doc: improve uv_{send,recv}_buffer_size() docs (Ryan Liptak)

* build: move -Wno-long-long check to configure time (Ben Noordhuis)

* unix: update uv_fs_copyfile() fallback logic (Stefan Bender)

* win: cast setsockopt struct to const char* (Shelley Vohr)
2019-10-16 14:53:28 -04:00
erw7
fd2ce38dd6 win,tty: add uv_tty_{get,set}_vterm_state
PR-URL: https://github.com/libuv/libuv/pull/2501
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <s@saghul.net>
Reviewed-By: Jameson Nash <vtjnash+github@gmail.com>
2019-10-09 09:36:36 +02:00
Ben Noordhuis
4ed2a78f0e unix,win: add uv_random()
Add an API for obtaining cryptographically strong random data from the
system PRNG.

Co-authored-by: Saúl Ibarra Corretgé <s@saghul.net>
Refs: https://github.com/libuv/libuv/pull/1055
PR-URL: https://github.com/libuv/libuv/pull/2347
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2019-09-18 08:09:14 +02:00
cjihrig
549f52c467
Now working on version 1.32.1
Fixes: https://github.com/libuv/libuv/issues/2457
2019-09-09 12:55:37 -04:00
cjihrig
697bea87b3
2019.09.10, Version 1.32.0 (Stable)
Changes since version 1.31.0:

* misc: enable stalebot (Saúl Ibarra Corretgé)

* win: map ERROR_ENVVAR_NOT_FOUND to UV_ENOENT (cjihrig)

* win: use L'\0' as UTF-16 null terminator (cjihrig)

* win: support retrieving empty env variables (cjihrig)

* unix,stream: fix returned error codes (Santiago Gimeno)

* test: fix typo in DYLD_LIBRARY_PATH (Ben Noordhuis)

* unix,signal: keep handle active if pending signal (Santiago Gimeno)

* openbsd: fix uv_cpu_info (Santiago Gimeno)

* src: move uv_free_cpu_info to uv-common.c (Santiago Gimeno)

* tcp: add uv_tcp_close_reset method (Santiago Gimeno)

* test: fix udp-multicast-join tests (Santiago Gimeno)

* test: remove assertion in fs_statfs test (cjihrig)

* doc: clarify uv_buf_t usage in uv_alloc_cb (Tomas Krizek)

* win: fix typo in preprocessor expression (Konstantin Podsvirov)

* timer: fix uv_timer_start on closing timer (seny)

* udp: add source-specific multicast support (Vladimir Karnushin)

* udp: fix error return values (Santiago Gimeno)

* udp: drop IPV6_SSM_SUPPORT macro (Santiago Gimeno)

* udp: fix uv__udp_set_source_membership6 (Santiago Gimeno)

* udp: use sockaddr_storage instead of union (Santiago Gimeno)

* build,zos: add _OPEN_SYS_SOCK_EXT3 flag (Santiago Gimeno)

* test: add specific source multicast tests (Santiago Gimeno)

* include: map EILSEQ error code (cjihrig)

* win, tty: improve SIGWINCH performance (Bartosz Sosnowski)

* build: fix ios build error (MaYuming)

* aix: replace ECONNRESET with EOF if already closed (Milad Farazmand)

* build: add cmake library VERSION, SOVERSION (Eneas U de Queiroz)

* build: make include/ public in CMakeLists.txt (Ben Noordhuis)

* build: export USING_UV_SHARED=1 to cmake deps (Ben Noordhuis)

* build: cmake_minimum_required(VERSION 2.8.12) (Daniel Hahler)

* aix: Fix broken cmpxchgi() XL C++ specialization. (Andrew Paprocki)

* test: fix -Wsign-compare warning (Ben Noordhuis)

* unix: simplify open(O_CLOEXEC) feature detection (Ben Noordhuis)

* unix: fix UV_FS_O_DIRECT definition on Linux (Joran Dirk Greef)

* doc: uv_handle_t documentation suggestion (Daniel Bevenius)
2019-09-09 12:53:10 -04:00
Joran Dirk Greef
9b12e023ab unix: fix UV_FS_O_DIRECT definition on Linux
According to http://man7.org/linux/man-pages/man2/open.2.html, the
O_DIRECT flag is Linux-specific. One must define _GNU_SOURCE to obtain
the correct definition.

However, defining _GNU_SOURCE in the headers is unhygienic and affects
the libuv consumer.

On Linux, we now define UV_FS_O_DIRECT explicitly according to
architecture, only falling back to O_DIRECT if defined, or 0 if not.

Fixes: https://github.com/libuv/libuv/issues/2420
PR-URL: https://github.com/libuv/libuv/pull/2441
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2019-09-06 22:50:27 +02:00
Ben Noordhuis
6325a7c840 build: export USING_UV_SHARED=1 to cmake deps
Build the shared library with `BUILDING_UV_SHARED=1` and export
`USING_UV_SHARED=1` to dependents so they get the right declspec.

Fixes: https://github.com/libuv/libuv/issues/1938
PR-URL: https://github.com/libuv/libuv/pull/2431
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2019-09-06 10:07:47 +02:00
cjihrig
43c74a6ee9
include: map EILSEQ error code
PR-URL: https://github.com/libuv/libuv/pull/2440
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2019-08-26 10:13:37 -04:00
Santiago Gimeno
9efc1961fe
udp: drop IPV6_SSM_SUPPORT macro
All the supported platforms support specific source multicast.

PR-URL: https://github.com/libuv/libuv/pull/2202
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2019-08-23 21:12:36 +02:00
Vladimir Karnushin
91d95f8ceb
udp: add source-specific multicast support
PR-URL: https://github.com/libuv/libuv/pull/2202
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2019-08-23 21:09:47 +02:00
Santiago Gimeno
958e85fbd8
tcp: add uv_tcp_close_reset method
It resets a TCP connection by sending a RST packet. Due to some platform
inconsistencies, mixing of `uv_shutdown` and `uv_tcp_close_reset` calls
is not allowed.

Fixes: https://github.com/libuv/libuv/issues/1991
PR-URL: https://github.com/libuv/libuv/pull/2425
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-08-19 23:41:15 +02:00
cjihrig
6f776765c7
Now working on version 1.31.1
Fixes: https://github.com/libuv/libuv/issues/2403
2019-08-09 10:59:08 -04:00
cjihrig
0a6771cee4
2019.08.10, Version 1.31.0 (Stable)
Changes since version 1.30.1:

* win,fs: don't modify global file translation mode (Javier Blazquez)

* win: fix uv_os_tmpdir when env var is 260 chars (Mustafa M)

* win: prevent tty event explosion machine hang (Javier Blazquez)

* win: add UV_FS_O_FILEMAP (João Reis)

* win, fs: mkdir return UV_EINVAL for invalid names (Bartosz Sosnowski)

* github: add root warning to template (cjihrig)

* win: misc fs cleanup (cjihrig)

* unix,win: add uv_fs_statfs() (cjihrig)

* test: avoid AF_LOCAL (Carlo Marcelo Arenas Belón)

* unix,win: add ability to retrieve all env variables (Saúl Ibarra
  Corretgé)

* Revert "darwin: speed up uv_set_process_title()" (Ben Noordhuis)

* doc: add %p to valgrind log-file arg (Zach Bjornson)

* doc: fix typo in basics.rst (Nan Xiao)

* ibmi: support Makefile build for IBM i (Xu Meng)

* OpenBSD: only get active CPU core count (Ben Davies)

* test: fix gcc 8 warnings for tests (Nhan Khong)

* ibmi: use correct header files (Xu Meng)

* unix: clear UV_HANDLE_READING flag before callback (zyxwvu Shi)

* unix: fix unused-function warning on BSD (Nhan Khong)

* test: fix test runner on MinGW (Crunkle)

* win: remove try-except outside MSVC (Crunkle)

* win: fix uv_spawn() ENOMEM on empty env (Ben Noordhuis)
2019-08-09 10:57:12 -04:00
Xu Meng
1bd72eb51f
ibmi: use correct header files
IBM i defines both of the __PASE__ and _AIX macros.
Commit 693b534 includes the wrong header file.
Need to check macro __PASE__ prior to _AIX.

PR-URL: https://github.com/libuv/libuv/pull/2371
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-08-06 12:19:34 -04:00
Saúl Ibarra Corretgé
2480b6158a unix,win: add ability to retrieve all env variables
Fixes: https://github.com/libuv/libuv/issues/2400

PR-URL: https://github.com/libuv/libuv/pull/2404
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2019-08-03 08:33:42 +02:00
cjihrig
bf86d5fbaf
unix,win: add uv_fs_statfs()
Fixes: https://github.com/libuv/libuv/issues/2386
PR-URL: https://github.com/libuv/libuv/pull/2396
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
2019-08-01 07:21:15 -10:00
João Reis
2c279504f9 win: add UV_FS_O_FILEMAP
Reading and writing files using a memory file mapping can be
significantly faster on Windows.

PR-URL: https://github.com/libuv/libuv/pull/2295
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
2019-07-16 18:20:10 +02:00
cjihrig
04a48e9ac8
Now working on version 1.30.2
Fixes: https://github.com/libuv/libuv/issues/2363
2019-07-02 10:57:15 -04:00
cjihrig
1551969c84
2019.07.03, Version 1.30.1 (Stable)
Changes since version 1.30.0:

* doc: fix incorrect versionchanged (cjihrig)

* test: allow UV_ECONNRESET in tcp_try_write_error (cjihrig)

* unix: add uv_get_constrained_memory() cygwin stub (cjihrig)

* build: fix android cmake build (Ben Noordhuis)

* unix: squelch -Wcast-function-type warning (Ben Noordhuis)

* build: fix compile error with uClibc (zlargon)
2019-07-02 10:55:03 -04:00
cjihrig
f50a746fa6
Now working on version 1.30.1
Fixes: https://github.com/libuv/libuv/issues/2343
2019-06-27 10:20:17 -04:00
cjihrig
365b6f2a0e
2019.06.28, Version 1.30.0 (Stable)
Changes since version 1.29.1:

* darwin: fall back to F_BARRIERFSYNC (Ben Noordhuis)

* darwin: add 32 bit close$NOCANCEL implementation
  (ken-cunningham-webuse)

* build, core, unix: add support for Haiku (Leorize)

* darwin,linux: more conservative minimum stack size (Ben Noordhuis)

* threadpool: increase UV_THREADPOOL_SIZE limit (Vlad A)

* unix: return actual error from `uv_try_write()` (Anna Henningsen)

* darwin: fix build error with macos 10.10 (Ben Noordhuis)

* unix: make uv_cwd() report UV_ENOBUFS (Ben Noordhuis)

* unix: make uv_fs_read() fill all buffers (Ben Noordhuis)

* test: give hrtime test a custom 10s timeout (Ben Noordhuis)

* fs: fix uv_fs_copyfile if same src and dst (Santiago Gimeno)

* build: add cmake option to skip building tests (Niels Lohmann)

* doc: add link to nodejs.org (Jenil Christo)

* unix: fix a comment typo in signal.c (Evgeny Ermakov)

* unix: remove redundant cast in process.c (gengjiawen)

* doc: fix wrong mutex function prototypes (Leo Chung)
2019-06-27 10:18:46 -04:00
Leorize
abe4f3d58d build, core, unix: add support for Haiku
This commit add support for Haiku, an open-source operating system
inspired by BeOS.

PR-URL: https://github.com/libuv/libuv/pull/2301
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-06-07 09:57:06 +02:00
cjihrig
4a4c9a688f
Now working on version 1.29.2
Fixes: https://github.com/libuv/libuv/issues/2306
2019-05-21 09:47:22 -04:00
cjihrig
d16e6094e1
2019.05.22, Version 1.29.1 (Stable)
Changes since version 1.29.0:

* unix: simplify uv/posix.h include logic (cjihrig)

* test: increase test timeout (cjihrig)

* linux: fix sscanf() overflows reading from /proc (Ben Noordhuis)
2019-05-21 09:44:45 -04:00
cjihrig
693b534f2c
unix: simplify uv/posix.h include logic
This commit includes uv/posix.h in one #elif instead of four.

PR-URL: https://github.com/libuv/libuv/pull/2302
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-05-20 14:07:46 -04:00
cjihrig
2169a53cd2
Now working on 1.29.1
Fixes: https://github.com/libuv/libuv/issues/2293
2019-05-15 13:16:23 -04:00
cjihrig
43957efd92
2019.05.16, Version 1.29.0 (Stable)
Changes since version 1.28.0:

* ibmi: read memory and CPU usage info (Xu Meng)

* doc: update the cmake testing instruction (zlargon)

* unix: fix race condition in uv_async_send() (Ben Noordhuis)

* linux: use O_CLOEXEC instead of EPOLL_CLOEXEC (Ben Noordhuis)

* doc: mark uv_async_send() as async-signal-safe (Ben Noordhuis)

* linux: init st_flags and st_gen when using statx (Oscar Waddell)

* linux: read free/total memory from /proc/meminfo (Ben Noordhuis)

* test: test zero-sized uv_fs_sendfile() writes (Ben Noordhuis)

* unix: don't assert on UV_PROCESS_WINDOWS_* flags (Ben Noordhuis)

* linux: set correct mac address for IP-aliases (Santiago Gimeno)

* win,util: fix null pointer dereferencing (Tobias Nießen)

* unix,win: fix `uv_fs_poll_stop()` when active (Anna Henningsen)

* doc: add missing uv_fs_type entries (Michele Caini)

* doc: fix build with sphinx 2.x (FX Coudert)

* unix: don't make statx system call on Android (George Zhao)

* unix: fix clang scan-build warning (Kyle Edwards)

* unix: fall back to kqueue on older macOS systems
  (ken-cunningham-webuse)

* unix,win: add uv_get_constrained_memory() (Kelvin Jin)

* darwin: fix thread cancellation fd leak (Ben Noordhuis)

* linux: fix thread cancellation fd leak (Ben Noordhuis)
2019-05-15 13:14:17 -04:00
Kelvin Jin
c4e9657d59
unix,win: add uv_get_constrained_memory()
Fixes: https://github.com/libuv/libuv/issues/2286
PR-URL: https://github.com/libuv/libuv/pull/2289
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-05-15 11:35:05 -04:00
cjihrig
2e443b12bd
Now working on 1.28.1
Fixes: https://github.com/libuv/libuv/issues/2228
2019-04-15 11:21:31 -04:00
cjihrig
7bf8fabfa9
2019.04.16, Version 1.28.0 (Stable)
Changes since version 1.27.0:

* unix,win: add uv_gettimeofday() (cjihrig)

* unix,win: add uv_fs_{open,read,close}dir() (cjihrig)

* unix: fix uv_interface_addresses() (Andreas Rohner)

* fs: remove macOS-specific copyfile(3) (Rich Trott)

* fs: add test for copyfile() respecting permissions (Rich Trott)

* build: partially revert 5234b1c43a (Ben Noordhuis)

* zos: fix setsockopt error when using AF_UNIX (Milad Farazmand)

* unix: suppress EINTR/EINPROGRESS in uv_fs_close() (Ben Noordhuis)

* build: use cmake APPLE variable to detect platform (zlargon)

* distcheck: remove duplicate test/ entry (Jameson Nash)

* unix: remove unused cmpxchgl() function (Ben Noordhuis)

* unix: support sockaddr_un in uv_udp_send() (Yury Selivanov)

* unix: guard use of PTHREAD_STACK_MIN (Kamil Rytarowski)

* unix,win: introduce uv_timeval64_t (cjihrig)

* doc: document uv_timeval_t and uv_timeval64_t (cjihrig)
2019-04-15 11:19:26 -04:00
cjihrig
2e090c8f2c
unix,win: introduce uv_timeval64_t
Fixes: https://github.com/libuv/libuv/issues/2243
PR-URL: https://github.com/libuv/libuv/pull/2246
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-04-11 14:08:17 -04:00
cjihrig
99440bb673
unix,win: add uv_fs_{open,read,close}dir()
Co-authored-by: Julien Gilli <jgilli@nodejs.org>
Co-authored-by: Jeremy Whitlock <jwhitlock@apache.org>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/libuv/libuv/pull/2057
Refs: https://github.com/joyent/libuv/issues/1430
Refs: https://github.com/joyent/libuv/pull/1521
Refs: https://github.com/joyent/libuv/pull/1574
Refs: https://github.com/libuv/libuv/pull/175
Refs: https://github.com/nodejs/node/issues/583
Refs: https://github.com/libuv/libuv/pull/416
Refs: https://github.com/libuv/libuv/issues/170
2019-03-26 18:47:51 -04:00
cjihrig
575d41481e
unix,win: add uv_gettimeofday()
PR-URL: https://github.com/libuv/libuv/pull/2221
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-03-25 20:23:49 -04:00
cjihrig
23bb992d7b
Now working on version 1.27.1
Fixes: https://github.com/libuv/libuv/issues/2213
2019-03-16 14:35:15 -04:00
cjihrig
a4fc9a66cc
2019.03.17, Version 1.27.0 (Stable)
Changes since version 1.26.0:

* doc: describe unix signal handling better (Vladimír Čunát)

* linux: use statx() to obtain file birth time (Ben Noordhuis)

* src: fill sockaddr_in6.sin6_len when it's defined (Santiago Gimeno)

* test: relax uv_hrtime() test assumptions (Ben Noordhuis)

* build: make cmake install LICENSE only once (Thomas Karl Pietrowski)

* bsd: plug uv_fs_event_start() error path fd leak (Ben Noordhuis)

* unix: fix __FreeBSD_kernel__ typo (cjihrig)

* doc: add note about uv_run() not being reentrant (Ben Noordhuis)

* unix, win: make fs-poll close wait for resource cleanup (Anna
  Henningsen)

* doc: fix typo in uv_thread_options_t definition (Ryan Liptak)

* win: skip winsock initialization in safe mode (evgley)

* unix: refactor getsockname/getpeername methods (Santiago Gimeno)

* win,udp: allow to use uv_udp_open on bound sockets (Santiago Gimeno)

* udp: add support for UDP connected sockets (Santiago Gimeno)

* build: fix uv_test shared uv Windows cmake build (ptlomholt)

* build: add android-configure scripts to EXTRA_DIST (Ben Noordhuis)

* build: add missing header (cjihrig)

* sunos: add perror() output prior to abort() (Andrew Paprocki)

* test,sunos: disable UV_DISCONNECT handling (Andrew Paprocki)

* sunos: disable __attribute__((unused)) (Andrew Paprocki)

* test,sunos: use unistd.h code branch (Andrew Paprocki)

* build,sunos: better handling of non-GCC compiler (Andrew Paprocki)

* test,sunos: fix statement not reached warnings (Andrew Paprocki)

* sunos: fix argument/prototype mismatch in atomics (Andrew Paprocki)

* test,sunos: test-ipc.c lacks newline at EOF (Andrew Paprocki)

* test: change spawn_stdin_stdout return to void (Andrew Paprocki)

* test: remove call to floor() in test driver (Andrew Paprocki)
2019-03-16 14:31:48 -04:00
Santiago Gimeno
90415a3394
udp: add support for UDP connected sockets
Add two new methods:

`uv_udp_connect()` to connect / disconnect an UDP handle.
`uv_udp_getpeername()` to get the remote peer address of a connected UDP
handle.

Modify `uv_udp_send()` and `uv_udp_try_send()` to accept a `NULL` `addr`
to send messages over an "UDP connection".

Refs: https://github.com/libuv/leps/pull/10
PR-URL: https://github.com/libuv/libuv/pull/1872
Backport-PR-URL: https://github.com/libuv/libuv/pull/2217
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-03-16 12:05:37 -04:00
cjihrig
598a49b942
Now working on version 1.26.1
Fixes: https://github.com/libuv/libuv/issues/2180
2019-02-10 11:46:28 -05:00
cjihrig
8669d8d3e9
2019.02.11, Version 1.26.0 (Stable)
Changes since version 1.25.0:

* doc: fix uv_get_free_memory doc (Stephen Belanger)

* unix: fix epoll cpu 100% issue (yeyuanfeng)

* openbsd,tcp: special handling of EINVAL on connect (ptlomholt)

* win: simplify registry closing in uv_cpu_info() (cjihrig)

* src,include: define UV_MAXHOSTNAMESIZE (cjihrig)

* win: return product name in uv_os_uname() version (cjihrig)

* thread: allow specifying stack size for new thread (Anna Henningsen)

* win: fix duplicate tty vt100 fn key (erw7)

* unix: don't attempt to invalidate invalid fd (Ben Noordhuis)
2019-02-10 11:44:47 -05:00
Anna Henningsen
0eca049a9b
thread: allow specifying stack size for new thread
PR-URL: https://github.com/libuv/libuv/pull/2179
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2019-02-08 21:15:01 +01:00
cjihrig
8865e72e25
src,include: define UV_MAXHOSTNAMESIZE
This commit adds UV_MAXHOSTNAMESIZE for working with
uv_os_gethostname(). Prior to this commit, this logic was
duplicated in several places across libuv and Node.js alone.

PR-URL: https://github.com/libuv/libuv/pull/2175
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-02-05 08:46:28 -05:00
cjihrig
a9e6cc7b99
Now working on version 1.25.1
Fixes: https://github.com/libuv/libuv/issues/2134
2019-01-18 13:32:48 -05:00
cjihrig
4a10a9d425
2019.01.19, Version 1.25.0 (Stable)
Changes since version 1.24.1:

* Revert "win,fs: retry if uv_fs_rename fails" (Ben Noordhuis)

* aix: manually trigger fs event monitoring (Gireesh Punathil)

* unix: rename WRITE_RETRY_ON_ERROR macro (Ben Noordhuis)

* darwin: DRY platform-specific error check (Ben Noordhuis)

* unix: refactor uv__write() (Ben Noordhuis)

* unix: don't send handle twice on partial write (Ben Noordhuis)

* tty,win: fix Alt+key under WSL (Bartosz Sosnowski)

* build: support running tests in out-of-tree builds (Jameson Nash)

* fsevents: really watch files with fsevents on macos 10.7+ (Jameson
  Nash)

* thread,mingw64: need intrin.h header for SSE2 MemoryBarrier (Jameson
  Nash)

* win: fix sizeof-pointer-div warning (cjihrig)

* unix,win: add uv_os_uname() (cjihrig)

* win, tty: fix CreateFileW() return value check (Bartosz Sosnowski)

* unix: enable IPv6 tests on OpenBSD (ptlomholt)

* test: fix test-ipc spawn_helper exit_cb (Santiago Gimeno)

* test: fix test-ipc tests (Santiago Gimeno)

* unix: better handling of unsupported F_FULLFSYNC (Victor Costan)

* win,test: de-flake fs_event_watch_dir_short_path (Refael Ackermann)

* win: fix msvc warning (sid)

* openbsd: switch to libuv's barrier implementation (ptlomholt)

* unix,stream: fix zero byte writes (Santiago Gimeno)

* ibmi: return EISDIR on read from directory fd (Kevin Adler)

* build: wrap long lines in Makefile.am (cjihrig)
2019-01-18 13:27:40 -05:00
Poul T Lomholt
176db21733 openbsd: switch to libuv's barrier implementation
On OpenBSD 6.4 x86_64 the barrier_serial_thread test fails due to
OpenBSD's pthread_barrier_wait() implementation returning
PTHREAD_BARRIER_SERIAL_THREAD from the first thread that releases the
wait. Switch to libuv's internal implementation to address the issue.

Fixes: https://github.com/libuv/libuv/issues/2145
PR-URL: https://github.com/libuv/libuv/pull/2144
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2019-01-16 22:25:38 +01:00
cjihrig
d4288bbeab
unix,win: add uv_os_uname()
Fixes: https://github.com/libuv/libuv/issues/2126
PR-URL: https://github.com/libuv/libuv/pull/2128
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2019-01-14 10:47:20 -05:00
cjihrig
3585e135c5
Now working on version 1.24.2
Fixes: https://github.com/libuv/libuv/issues/2109
2018-12-16 14:12:36 -05:00
cjihrig
274f2bd3b7
2018.12.17, Version 1.24.1 (Stable)
Changes since version 1.24.0:

* test: fix platform_output test on cygwin (damon-kwok)

* gitignore: ignore build/ directory (Damon Kwok)

* unix: zero epoll_event before use (Ashe Connor)

* darwin: use runtime check for file cloning (Ben Noordhuis)

* doc: replace deprecated build command on macOS (Rick)

* warnings: fix code that emits compiler warnings (Jameson Nash)

* doc: clarify expected memory management strategy (Ivan Krylov)

* test: add uv_inet_ntop(AF_INET) coverage (Ben Noordhuis)

* unix: harden string copying, introduce strscpy() (Ben Noordhuis)

* linux: get rid of strncpy() call (Ben Noordhuis)

* aix: get rid of strcat() calls (Ben Noordhuis)

* aix: fix data race in uv_fs_event_start() (Ben Noordhuis)

* win: fs: fix `FILE_FLAG_NO_BUFFERING` for writes (Joran Dirk Greef)

* build: don't link against -lpthread on Android (Michael Meier)
2018-12-16 14:11:04 -05:00
Ben Noordhuis
8972e65bf5 unix: harden string copying, introduce strscpy()
Replace calls to strcpy() and strncpy() with the newly introduced
uv__strscpy() function that is meticulous about zero-terminating
the destination buffer.

PR-URL: https://github.com/libuv/libuv/pull/2065
Refs: https://www.kernel.org/doc/htmldocs/kernel-api/API-strscpy.html
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-12-04 17:08:09 +01:00
cjihrig
32cccbc9f0
Now working on version 1.24.1
Fixes: https://github.com/libuv/libuv/issues/2070
2018-11-12 23:57:04 -05:00
cjihrig
2d427ee008
2018.11.14, Version 1.24.0 (Stable)
Changes since version 1.23.2:

* unix: do not require PATH_MAX to be defined (Brad King)

* win,doc: path encoding in uv_fs_XX is UTF-8 (hitesh)

* unix: add missing link dependency on kFreeBSD (Svante Signell)

* unix: add support for GNU/Hurd (Samuel Thibault)

* test: avoid memory leak for test_output (Carlo Marcelo Arenas Belón)

* zos: avoid UB with NULL pointer arithmetic (Carlo Marcelo Arenas
  Belón)

* doc: add vtjnash to maintainers (Jameson Nash)

* unix: restore skipping of phys_addr copy (cjihrig)

* unix,win: make uv_interface_addresses() consistent (cjihrig)

* unix: remove unnecessary linebreaks (cjihrig)

* unix,win: handle zero-sized allocations uniformly (Ben Noordhuis)

* unix: remove unused uv__dup() function (Ben Noordhuis)

* core,bsd: refactor process_title functions (Santiago Gimeno)

* win: Redefine NSIG to consider SIGWINCH (Jeremy Studer)

* test: make sure that reading a directory fails (Sakthipriyan
  Vairamani)

* win, tty: remove zero-size read callbacks (Bartosz Sosnowski)

* test: fix test runner getenv async-signal-safety (Ben Noordhuis)

* test: fix test runner execvp async-signal-safety (Ben Noordhuis)

* test,unix: fix race in test runner (Ben Noordhuis)

* unix,win: support IDNA 2008 in uv_getaddrinfo() (Ben Noordhuis)

* win, tcp: avoid starving the loop (Bartosz Sosnowski)

* win, dl: proper error messages on some systems (Bartosz Sosnowski)

* win,fs: retry if uv_fs_rename fails (Bartosz Sosnowski)

* darwin: speed up uv_set_process_title() (Ben Noordhuis)

* aix: fix race in uv_get_process_title() (Gireesh Punathil)

* win: support more fine-grained windows hiding (Bartosz Sosnowski)
2018-11-12 23:55:22 -05:00
Bartosz Sosnowski
4c2dcca27b
win: support more fine-grained windows hiding
Added UV_PROCESS_WINDOWS_HIDE_CONSOLE and
UV_PROCESS_WINDOWS_HIDE_GUI for specifying if console or GUI
subprocess windows are to be hidden.

Refs: https://github.com/nodejs/node/pull/24034
PR-URL: https://github.com/libuv/libuv/pull/2073
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-11-10 14:43:23 -05:00
Jeremy Studer
20f2351886
win: Redefine NSIG to consider SIGWINCH
Since SIGWINCH is being defined with a value above the existing NSIG,
redefine NSIG on WIN32.

PR-URL: https://github.com/libuv/libuv/pull/2032
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-10-18 10:15:26 +02:00
Samuel Thibault
1d1969adcc
unix: add support for GNU/Hurd
PR-URL: https://github.com/libuv/libuv/pull/2008
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>

Bug-Debian: https://bugs.debian.org/881882
2018-10-11 12:14:36 +02:00
cjihrig
0c2b3de331
Now working on version 1.23.3
Fixes: https://github.com/libuv/libuv/issues/2024
2018-10-08 12:53:48 -04:00
cjihrig
34c12788d2
2018.10.09, Version 1.23.2 (Stable)
Changes since version 1.23.1:

* unix: return 0 retrieving rss on cygwin (cjihrig)

* unix: initialize uv_interface_address_t.phys_addr (cjihrig)

* test: handle uv_os_setpriority() windows edge case (cjihrig)

* tty, win: fix read stop for raw mode (Bartosz Sosnowski)

* Revert "Revert "unix,fs: fix for potential partial reads/writes""
  (Jameson Nash)

* unix,readv: always permit partial reads to return (Jameson Nash)

* win,tty: fix uv_tty_close() (Bartosz Sosnowski)

* doc: remove extraneous "on" (Ben Noordhuis)

* unix,win: fix threadpool race condition (Anna Henningsen)

* unix: rework thread barrier implementation (Ben Noordhuis)

* aix: switch to libuv's own thread barrier impl (Ben Noordhuis)

* unix: signal done to last thread barrier waiter (Ben Noordhuis)

* test: add uv_barrier_wait serial thread test (Ali Ijaz Sheikh)

* unix: optimize uv_fs_readlink() memory allocation (Ben Noordhuis)

* win: remove req.c and other cleanup (Carlo Marcelo Arenas Belón)

* aix: don't EISDIR on read from directory fd (Ben Noordhuis)
2018-10-08 12:52:30 -04:00
Ben Noordhuis
a3a601c5da aix: switch to libuv's own thread barrier impl
It was pointed out that pthread_barrier_wait() behaves slightly
different from other platforms. Switch to libuv's own thread barrier
for uniformity of behavior. Perhaps we'll do that for more platforms
in the future.

PR-URL: https://github.com/libuv/libuv/pull/2019
Refs: https://github.com/libuv/libuv/pull/2003#issuecomment-426471646
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2018-10-08 11:14:41 +02:00
Ben Noordhuis
56702e08bf unix: rework thread barrier implementation
* dissolve include/uv/pthread-barrier.h

* use libuv mutexes and condition variables, not pthreads's

* drive-by cleanup and simplification enabled by the first two items

PR-URL: https://github.com/libuv/libuv/pull/2019
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2018-10-08 11:14:41 +02:00
cjihrig
deb2226909
Now working on version 1.23.2
Fixes: https://github.com/libuv/libuv/issues/1993
2018-09-21 10:10:01 -04:00
cjihrig
d2282b3d67
2018.09.22, Version 1.23.1 (Stable)
Changes since version 1.23.0:

* unix,win: limit concurrent DNS calls to nthreads/2 (Anna Henningsen)

* doc: add addaleax to maintainers (Anna Henningsen)

* doc: add missing slash in stream.rst (Emil Bay)

* unix,fs: use utimes & friends for uv_fs_utime (Jeremiah Senkpiel)

* unix,fs: remove linux fallback from utimesat() (Jeremiah Senkpiel)

* unix,fs: remove uv__utimesat() syscall fallback (Jeremiah Senkpiel)

* doc: fix argument name in tcp.rts (Emil Bay)

* doc: notes on running tests, benchmarks, tools (Jamie Davis)

* linux: remove epoll syscall wrappers (Ben Noordhuis)

* linux: drop code path for epoll_pwait-less kernels (Ben Noordhuis)

* Partially revert "win,code: remove GetQueuedCompletionStatus-based
  poller" (Jameson Nash)

* build: add compile for android arm64/x86/x86-64 (Andy Zhang)

* doc: clarify that some remarks apply to windows (Bert Belder)

* test: fix compiler warnings (Jamie Davis)

* ibmi: return 0 from uv_resident_set_memory() (dmabupt)

* win: fix uv_udp_recv_start() error translation (Ryan Liptak)

* win,doc: improve uv_os_setpriority() documentation (Bartosz Sosnowski)

* test: increase upper bound in condvar_5 (Jamie Davis)

* win,tty: remove deadcode (Jameson Nash)

* stream: autodetect direction (Jameson Nash)
2018-09-21 10:08:29 -04:00
cjihrig
69c43d987b
Now working on version 1.23.1
Fixes: https://github.com/libuv/libuv/issues/1942
2018-08-16 22:07:33 -04:00
cjihrig
7ebb26225f
2018.08.18, Version 1.23.0 (Stable)
Changes since version 1.22.0:

* win,pipe: restore compatibility with the old IPC framing protocol
  (Bert Belder)

* fs: add uv_open_osfhandle (Bartosz Sosnowski)

* doc: update Visual C++ Build Tools URL (Michał Kozakiewicz)

* unix: loop starvation on successful write complete (jBarz)

* win: add uv__getnameinfo_work() error handling (A. Hauptmann)

* win: return UV_ENOMEM from uv_loop_init() (cjihrig)

* unix,win: add uv_os_{get,set}priority() (cjihrig)

* test: fix warning in test-tcp-open (Santiago Gimeno)
2018-08-16 22:05:34 -04:00
cjihrig
e57e07172e
unix,win: add uv_os_{get,set}priority()
Refs: https://github.com/nodejs/node/pull/21675
PR-URL: https://github.com/libuv/libuv/pull/1945
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-08-15 09:17:55 -04:00
Bartosz Sosnowski
8f96a5b07b fs: add uv_open_osfhandle
Adds uv_open_osfhandle to complete uv_get_osfhandle

Ref: https://github.com/nodejs/node/issues/15433
Ref: https://github.com/nodejs/node-addon-api/issues/304
PR-URL: https://github.com/libuv/libuv/pull/1927
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2018-08-09 11:19:15 +02:00
cjihrig
31a06f25e1
Now working on version 1.22.1
Fixes: https://github.com/libuv/libuv/issues/1914
2018-07-09 22:07:40 -04:00
cjihrig
8568f78a77
2018.07.11, Version 1.22.0 (Stable)
Changes since version 1.21.0:

* unix: remove checksparse.sh (Ben Noordhuis)

* win: fix mingw build error (Ben Noordhuis)

* win: fix -Wunused-function warnings in thread.c (Ben Noordhuis)

* unix,win: merge timers implementation (Ben Noordhuis)

* win: fix pointer type in pipe.c (Ben Noordhuis)

* win: fixing build for older MSVC compilers (Michael Fero)

* zos: clear poll events on every iteration (jBarz)

* zos: write-protect message queue (jBarz)

* zos: use correct pointer type in strnlen (jBarz)

* unix,win: merge handle flags (Ben Noordhuis)

* doc: update Imran Iqbal's GitHub handle (cjihrig)

* src: add new error apis to prevent memory leaks (Shelley Vohr)

* test: make test-condvar call uv_cond_wait (Jamie Davis)

* fs: change position of uv_fs_lchown (Ujjwal Sharma)
2018-07-09 22:04:47 -04:00
Ujjwal Sharma
4f43a8673b
fs: change position of uv_fs_lchown
Change the position of UV_LS_LCHOWN, moving it to the end in order to go
around a bug due to it's initial position.

The original position of UV_LS_LCHOWN broke ABI compat, causing a binary
using UV_FS_REALPATH or UV_FS_COPYFILE to break, as the values point to
wrong function.

Refs: https://github.com/yarnpkg/yarn/issues/6043
Fixes: https://github.com/libuv/libuv/issues/1908
PR-URL: https://github.com/libuv/libuv/pull/1913
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2018-07-07 15:48:44 +02:00
Shelley Vohr
5124b27d35
src: add new error apis to prevent memory leaks
This PR creates two new externally-facing APIs, uv_err_name_r() and
uv_strerror_r().

In keeping with the precedent set by POSIX, the *_r() suffix of these
two new methods indicate that the caller does the memory management and
passes in the memory that the output will be stored in, which provides
an alternative for the two existent methods (uv_err_name() and
uv_strerror()), which, when called with an unknown error code, leak a
few bytes of memory.

PR-URL: https://github.com/libuv/libuv/pull/1898
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno santiago.gimeno@gmail.com
2018-07-06 19:35:21 +02:00
Ben Noordhuis
95c5bf8db1 unix,win: merge timers implementation
Merge src/unix/timer.c and src/win/timer.c into src/timer.c.  This
changes the Windows implementation from a binary tree to a binary
heap for generally better performance.

PR-URL: https://github.com/libuv/libuv/pull/1882
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-06-25 23:48:15 +02:00
cjihrig
07955ed373
Now working on version 1.21.1
Fixes: https://github.com/libuv/libuv/issues/1897
2018-06-22 11:07:12 -04:00
cjihrig
e4983a9b0c
2018.06.23, Version 1.21.0 (Stable)
Changes since version 1.20.3:

* unix,windows: map EFTYPE errno (cjihrig)

* win: perform case insensitive PATH= comparison (cjihrig)

* win, fs: uv_fs_fchmod support for -A files (Bartosz Sosnowski)

* src,lib: fix comments (Tobias Nießen)

* win,process: allow child pipe handles to be opened in overlapped mode
  (Björn Linse)

* src,test: fix idiosyncratic comment style (Bert Belder)

* test: fs_fchmod_archive_readonly must return a value (Bert Belder)

* win,pipe: fix incorrect error code returned from uv_pipe_write_impl()
  (Bert Belder)

* win,pipe: properly set uv_write_t.send_handle in uv_write2() (Bert
  Belder)

* test: add vectored uv_write() ping-pong tests (Bert Belder)

* win,pipe: support vectored uv_write() calls (Bert Belder)

* win,pipe: refactor pipe read cancellation logic (Bert Belder)

* test: improve output from IPC test helpers (Bert Belder)

* test: add test for IPC deadlock on Windows (

* win,pipe: fix IPC pipe deadlock (Bert Belder)

* unix: catch some cases of watching fd twice (Ben Noordhuis)

* test: use custom timeout for getaddrinfo_fail_sync (Ben Noordhuis)

* Revert "win: add Windows XP support to uv_if_indextoname()" (Bert
  Belder)

* win,thread: remove fallback uv_cond implementation (Bert Belder)

* src,test: s/olny/only (cjihrig)

* unix: close signal pipe fds on unload (Ben Noordhuis)

* win: allow setting udp socket options before bind (cjihrig)

* unix: return UV_ENOTSUP on FICLONE_FORCE failure (cjihrig)

* win,pipe: remove unreferenced local variable (Bert Belder)

* win,code: remove GetQueuedCompletionStatus-based poller (Bert Belder)

* win: remove the remaining dynamic kernel32 imports (Bert Belder)

* test: speedup process-title-threadsafe on macOS (cjihrig)

* core: move all include files except uv.h to uv/ (Saúl Ibarra Corretgé)

* win: move stdint-msvc2008.h to include/uv/ (Ben Noordhuis)

* build: fix cygwin install (Ben Noordhuis)

* build,win: remove MinGW Makefile (Saúl Ibarra Corretgé)

* build: add a cmake build file (Ben Noordhuis)

* build: add test suite option to cmake build (Ben Noordhuis)

* unix: set errno in uv_fs_copyfile() (cjihrig)

* samples: fix inconsistency in parse_opts vs usage (zyxwvu Shi)

* linux: handle exclusive POLLHUP with UV_DISCONNECT (Brad King)

* include: declare uv_cpu_times_s in higher scope (Peter Johnson)

* doc: add uv_fs_fsync() AIX limitations (jBarz)

* unix,win: add uv_fs_lchown() (Paolo Greppi)

* unix: disable clang variable length array warning (Peter Johnson)

* doc: document uv_pipe_t::ipc (Ed Schouten)

* doc: undocument uv_req_type's UV_REQ_TYPE_PRIVATE (Ed Schouten)

* doc: document UV_*_MAP() macros (Ed Schouten)

* win: remove use of min() macro in pipe.c (Peter Johnson)

* doc: add jbarz as maintainer (
2018-06-22 11:04:58 -04:00
Paolo Greppi
aa28f7d5bf
unix,win: add uv_fs_lchown()
Fixes: https://github.com/libuv/libuv/issues/1790
PR-URL: https://github.com/libuv/libuv/pull/1826
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-06-19 10:05:01 -04:00
Peter Johnson
02fc10918c
include: declare uv_cpu_times_s in higher scope
This fixes a C/C++ ambiguity about whether this structure is
scoped or global.

PR-URL: https://github.com/libuv/libuv/pull/1888
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-06-19 09:29:33 -04:00
Ben Noordhuis
47dcc07cf7 win: move stdint-msvc2008.h to include/uv/
Move it so that include/ contains uv.h and nothing more.

PR-URL: https://github.com/libuv/libuv/pull/1850
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-06-14 18:40:09 +02:00
Saúl Ibarra Corretgé
99ae3edf28 core: move all include files except uv.h to uv/
This is a cherry-pick of commit d010030ad5 from the master branch.

Conflicts:
 	Makefile.am
 	include/uv.h
 	include/uv/unix.h
 	libuv.nsi (deleted)
 	src/unix/pthread-barrier.c (deleted)

PR-URL: https://github.com/libuv/libuv/pull/1850
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-06-14 18:39:32 +02:00
Bert Belder
13e8b15eb7
win,thread: remove fallback uv_cond implementation
The fallback implementation existed to support Windows XP and Server 2003,
but these old versions of windows are no longer supporter by libuv.

PR-URL: https://github.com/libuv/libuv/pull/1852
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-05-30 13:23:55 -07:00
Bert Belder
4e53af9120
win,pipe: fix IPC pipe deadlock
This fixes a bug where IPC pipe communication would deadlock when both
ends of the pipe are written to simultaneously, and the kernel pipe
buffer has already been filled up by earlier writes.

The root cause of the deadlock is that, while writes to an IPC pipe are
generally asynchronous, the IPC frame header is written synchronously.
So when both ends of the pipe are sending a frame header at the same
time, neither will read data off the pipe, causing both header writes
to block indefinitely.

Additionally, this patch somewhat reduces the spaghetti level in
win/pipe.c.

Fixes: https://github.com/libuv/libuv/issues/1099
Refs: https://github.com/nodejs/node/issues/7657
Refs: https://github.com/electron/electron/issues/10107
Refs: https://github.com/parcel-bundler/parcel/issues/637
Refs: https://github.com/parcel-bundler/parcel/issues/900
Refs: https://github.com/parcel-bundler/parcel/issues/1137
PR-URL: https://github.com/libuv/libuv/pull/1843
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2018-05-29 13:02:22 -07:00
Bert Belder
4f60e0c1d7
win,pipe: refactor pipe read cancellation logic
* Don't silently ignore ERROR_OPERATION_ABORTED.

  Code to silently ignore this error was added in c42a4ca, under the
  false premise that this error is somehow equivalent to EINTR on posix
  platforms. This isn't true; ERROR_OPERATION_ABORTED doesn't happen
  unless the application explicitly aborts an I/O operation.

  Silently ignoring this error elsewhere could potentially hide bugs,
  hence libuv shouldn't do it. Instead, explicitly deal with it where
  it is expected.

* Don't mark aborted reads as successful.

  The worker thread used to call ReadFile() on synchronous pipes would
  incorrectly mark cancelled read requests as successful, leading to
  issues later on.

* Rely on main thread to restart aborted reads.

  After a blocking ReadFile() call was cancelled, the worker thread
  would previously attempt to restart it immediately, making
  synchronization logic needlessly complex. Instead, we simply cancel
  the operation, and leave it to the main loop to restart it if so
  desired.

  Since we now realy on the main thread to restart interrupted
  ReadFile() calls, we can now have a single function interrupts a
  synchronous read until the event loop restarts it again.

* Clean up uv__pipe_read_stop().

  A single function to interrupt blocking reads also allows us to
  remove weird logic in uv__pipe_read_stop() that quickly pauses and
  unpauses a read operation in the hope of cancelling it.

* Assume CancelIo() and CancelSynchronousIo() are always available.

  Since libuv doesn't support windows XP and Server 2003 any more, we
  can assume that these APIs are always available, and do away with
  branching around them.

PR-URL: https://github.com/libuv/libuv/pull/1843
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2018-05-29 13:01:34 -07:00
Bert Belder
12733dd455
win,pipe: support vectored uv_write() calls
Fixes: https://github.com/libuv/libuv/issues/794
PR-URL: https://github.com/libuv/libuv/pull/1843
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2018-05-29 13:01:29 -07:00
Bert Belder
e7e8b6fb9b
win,pipe: properly set uv_write_t.send_handle in uv_write2()
PR-URL: https://github.com/libuv/libuv/pull/1843
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2018-05-29 13:01:19 -07:00
Bert Belder
9584df25dc
src,test: fix idiosyncratic comment style
Back in the day I wrote comments in a really unusual way. Nowadays it
makes my eyes bleed, and clang-format doesn't know how to deal with it.

PR-URL: https://github.com/libuv/libuv/pull/1853
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2018-05-29 11:56:49 -07:00
Björn Linse
62a0f763a7
win,process: allow child pipe handles to be opened in overlapped mode
PR-URL: https://github.com/libuv/libuv/pull/1784
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Bert Belder <bertbelder@gmail.com>
2018-05-25 15:32:32 -07:00
cjihrig
fe3fbd63e5
unix,windows: map EFTYPE errno
Refs: https://github.com/nodejs/node/pull/20588
PR-URL: https://github.com/libuv/libuv/pull/1836
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2018-05-09 12:05:46 -04:00
cjihrig
b82c624f74
Now working on version 1.20.4 2018-05-07 18:30:48 -04:00
cjihrig
8cfd67e591
2018.05.08, Version 1.20.3 (Stable)
Changes since version 1.20.2:

* win: add Windows XP support to uv_if_indextoname() (ssrlive)

* win: fix `'floor' undefined` compiler warning (ssrlive)

* win, pipe: stop read for overlapped pipe (Bartosz Sosnowski)

* build: fix utf-8 name of copyright holder (Jérémy Lal)

* zos: initialize pollfd revents (jBarz)

* zos,doc: add system V message queue note (jBarz)

* linux: don't use uv__nonblock_ioctl() on sparc (Ben Noordhuis)
2018-05-07 18:28:28 -04:00
cjihrig
0dd95819ba
Now working on version 1.20.3 2018-04-22 13:59:50 -04:00
cjihrig
c51fd3f66b
2018.04.23, Version 1.20.2 (Stable)
Changes since version 1.20.1:

* zos: use custom semaphore (jBarz)

* win: fix registry API error handling (Kyle Farnung)

* build: add support for 64-bit AIX (Richard Lau)

* aix: guard STATIC_ASSERT for glibc work around (Richard Lau)
2018-04-22 13:58:18 -04:00
John Barboza
1e4823ca99 zos: use custom semaphore
The System V semaphores on z/OS require explicit ending of the worker
threads and cleanup at process exit. The user will have to manually
cleanup these resources that are left behind. Instead use the custom
semaphore implementation which uses posix mutexes and condition
variables which are cleaned up automatically on process exit.

PR-URL: https://github.com/libuv/libuv/pull/1805
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2018-04-18 22:24:37 +02:00
cjihrig
d61d6f326c
Now working on version 1.20.2
Fixes: https://github.com/libuv/libuv/issues/1801
2018-04-18 09:21:49 -04:00
cjihrig
36ac2fc8ed
2018.04.19, Version 1.20.1 (Stable)
Changes since version 1.20.0:

* doc,fs: improve documentation (Bob Burger)

* win: return a floored double from uv_uptime() (Refael Ackermann)

* doc: clarify platform specific pipe naming (Thomas Versteeg)

* unix: fix uv_pipe_chmod() on macOS (zzzjim)

* unix: work around glibc semaphore race condition (Anna Henningsen)

* tcp,openbsd: disable Unix TCP check for IPV6_ONLY (Alex Arslan)

* test,openbsd: use RETURN_SKIP in UDP IPv6 tests (Alex Arslan)

* test,openbsd: fix multicast test (Alex Arslan)

* Revert "win, fs: use FILE_WRITE_ATTRIBUTES when opening files"
  (cjihrig)
2018-04-18 09:18:43 -04:00
cjihrig
00d13c5b9f
Now working on version 1.20.1
Fixes: https://github.com/libuv/libuv/issues/1785
2018-04-02 13:25:33 -04:00
cjihrig
0012178ee2
2018.04.03, Version 1.20.0 (Stable)
Changes since version 1.19.2:

* unix,spawn: respect user stdio flags for new pipe (Jameson Nash)

* Revert "Revert "unix,tcp: avoid marking server sockets connected""
  (Jameson Nash)

* req: revisions to uv_req_t handling (Jameson Nash)

* win: remove unnecessary initialization (cjihrig)

* win: update uv_os_homedir() to use uv_os_getenv() (cjihrig)

* test: fix tcp_oob test flakiness (Santiago Gimeno)

* posix: fix uv__pollfds_del() for invalidated fd's (Jesse Gorzinski)

* doc: README: add note on installing gyp (Jamie Davis)

* unix: refactor uv_os_homedir to use uv_os_getenv (Santiago Gimeno)

* unix: fix several instances of lost errno (Michael Kilburn)

* win,tty: update several TODO comments (Ruslan Bekenev)

* unix: add UV_FS_COPYFILE_FICLONE support (cjihrig)

* test: fix connect_unspecified (Santiago Gimeno)

* unix,win: add UV_FS_COPYFILE_FICLONE_FORCE support (cjihrig)

* win: use long directory name for handle->dirw (Nicholas Vavilov)

* build: build with -D_FILE_OFFSET_BITS=64 again (Ben Noordhuis)

* win, fs: fix uv_fs_unlink for +R -A files (Bartosz Sosnowski)

* win, fs: use FILE_WRITE_ATTRIBUTES when opening files (Bartosz
  Sosnowski)

* unix: use __PASE__ on IBM i platforms (Jesse Gorzinski)

* test,freebsd: fix flaky poll tests (Santiago Gimeno)

* test: increase connection timeout to 1 second (jBarz)

* win,tcp: handle canceled connect with ECANCELED (Jameson Nash)
2018-04-02 13:23:58 -04:00
ThePrez
7f85924e8b
unix: use __PASE__ on IBM i platforms
IBM i compilers now predefine __PASE__. This commit updates
code to rely on that rather than manually setting (or relying on)
a _PASE definition.

PR-URL: https://github.com/libuv/libuv/pull/1782
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2018-03-31 16:41:53 -04:00
cjihrig
3ae88200d6
unix,win: add UV_FS_COPYFILE_FICLONE_FORCE support
UV_FS_COPYFILE_FICLONE_FORCE attempts to use copy-on-write
semantics in uv_fs_copyfile(). If CoW is not available, an
error is returned.

Refs: https://github.com/libuv/libuv/pull/1465
Refs: https://github.com/libuv/libuv/pull/1491
PR-URL: https://github.com/libuv/libuv/pull/1768
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2018-03-16 01:00:43 -04:00
cjihrig
db918361eb
unix: add UV_FS_COPYFILE_FICLONE support
UV_FS_COPYFILE_FICLONE attemps to use copy-on-write
semantics in uv_fs_copyfile(). If CoW is not available,
it falls back to a normal copy operation.

Refs: https://github.com/libuv/libuv/pull/1465
PR-URL: https://github.com/libuv/libuv/pull/1491
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2018-03-05 10:18:30 -05:00
Jameson Nash
88c2af0e65
req: revisions to uv_req_t handling
- Remove the `active_reqs` queue, which is never used. There are more
   efficient per-stream queues that `libuv` uses whenever it needs this
   information, so duplicating it and managing it here seems
   like unnecessary extra space and work.
 - Unix `uv_loop_init` didn't explicitly initialize.
   `loop->active_handles` (although it did memset the whole struct
   to 0, so it wasn't wrong previously, just inconsistent).
 - Consolidate repeated code for `uv__has_active_reqs`.
 - Change `uv__loop_alive` to use the helper functions (mirroring the
   unix copy of the same function).
 - Initialize some more uv_stream_t fields in init, rather than waiting
   for the connection callback. This helps surface bugs in libuv or the
   caller better, since it ensures libuv doesn't see uninitialized
   memory if asked to look at these fields before it thinks the socket
   is connected.
 - Fixes what appears to be a double-counting of `handle->reqs_pending`,
   in the highly-unlikely event that the code wants to emulate IOCP,
   but `RegisterWaitForSingleObject` somehow managed to fail.

PR-URL: https://github.com/libuv/libuv/pull/1746
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2018-02-25 18:49:37 +01:00
cjihrig
cef8a4624b
Now working on version 1.19.3
Fixes: https://github.com/libuv/libuv/issues/1750
2018-02-21 15:29:40 -05:00
cjihrig
c5afc37e2a
2018.02.22, Version 1.19.2 (Stable)
Changes since version 1.19.1:

* test: fix incorrect asserts (cjihrig)

* test: fix a typo in test-fork.c (Felix Yan)

* build: remove long-obsolete gyp workarounds (Ben Noordhuis)

* build: split off tests into separate gyp file (Ben Noordhuis)

* test: check uv_cond_timedwait more carefully (Jamie Davis)

* include,src: introduce UV__ERR() macro (Mason X)

* build: add url field to libuv.pc (Ben Noordhuis)

* doc: mark IBM i as Tier 3 support (Jesse Gorzinski)

* win,build: correct C2059 errors (Michael Fero)

* zos: fix timeout for condition variable (jBarz)

* win: CREATE_NO_WINDOW when stdio is not inherited (Nick Logan)

* build: fix commmon.gypi comment (Ryuichi KAWAMATA)

* doc: document uv_timer_start() on an active timer (Vladimír Čunát)

* doc: add note about handle movability (Bartosz Sosnowski)

* doc: fix syntax error in loop documentation (Bartosz Sosnowski)

* osx,stream: retry sending handle on EMSGSIZE error (Santiago Gimeno)

* unix: delay fs req register until after validation (cjihrig)

* test: add tests for bad inputs (Joyee Cheung)

* unix,win: ensure req->bufs is freed (cjihrig)

* test: add additional fs memory management checks (cjihrig)
2018-02-21 15:25:38 -05:00
Mason X
89cbbc895b
include,src: introduce UV__ERR() macro
Using -errno, -E**, and -pthread_function() can be
error prone, and breaks compatibility with some operating
systems that already negate errno's (e.g. Haiku).

This commit adds a UV__ERR() macro that ensures libuv
errors are negative.

Fixes: https://github.com/libuv/help/issues/39
PR-URL: https://github.com/libuv/libuv/pull/1687
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2018-02-08 22:38:02 -05:00
cjihrig
faa52872b9
Now working on version 1.19.2 2018-01-19 15:22:56 -05:00
cjihrig
8202d17511
2018.01.20, Version 1.19.1 (Stable)
Changes since version 1.19.0:

* Revert "unix,tcp: avoid marking server sockets connected" (Ben
  Noordhuis)

* Revert "unix,fs: fix for potential partial reads/writes" (Ben
  Noordhuis)

* Revert "win: use RemoveDirectoryW() instead of _wmrmdir()" (Ben
  Noordhuis)

* cygwin: fix compilation of ifaddrs impl (Brad King)
2018-01-19 15:17:23 -05:00
cjihrig
1366e74120
Now working on version 1.19.1
Fixes: https://github.com/libuv/libuv/issues/1697
2018-01-17 10:50:30 -05:00
cjihrig
effbb7c9d2
2018.01.18, Version 1.19.0 (Stable)
Changes since version 1.18.0:

* core: add getter/setter functions for easier ABI compat (Anna
  Henningsen)

* unix: make get(set)_process_title MT-safe (Matt Harrison)

* unix,win: wait for threads to start (Ben Noordhuis)

* test: add threadpool init/teardown test (Bartosz Sosnowski)

* win, process: uv_kill improvements (Bartosz Sosnowski)

* win: set _WIN32_WINNT to 0x0600 (cjihrig)

* zos: implement uv_fs_event* functions (jBarz)

* unix,tcp: avoid marking server sockets connected (Jameson Nash)

* doc: mark Windows 7 as Tier 1 support (Bartosz Sosnowski)

* win: map 0.0.0.0 and :: addresses to localhost (Bartosz Sosnowski)

* build: install libuv.pc unconditionally (Ben Noordhuis)

* test: remove custom timeout for thread test on ppc (Ben Noordhuis)

* test: allow multicast not permitted status (Jérémy Lal)

* test: allow net unreachable status in udp test (Ben Noordhuis)

* unix: use SA_RESTART when setting our sighandler (Brad King)

* unix,fs: fix for potential partial reads/writes (Ben Wijen)

* win,build: do not build executable installer for dll (Bert Belder)

* win: allow directory symlinks to be created in a non-elevated context
  (Bert Belder)

* zos,test: accept SIGKILL for flaky test (jBarz)

* win: use RemoveDirectoryW() instead of _wmrmdir() (Ben Noordhuis)

* unix: fix uv_cpu_info() error on FreeBSD (elephantp)

* zos,test: decrease pings to avoid timeout (jBarz)
2018-01-17 10:46:26 -05:00
John Barboza
b01de7341f
zos: implement uv_fs_event* functions
This commit uses the Register File Interest feature on z/OS
to enable users to monitor file system events.
The poll call is used to check for file descriptors as well
as a message queue that z/OS will report file system events
on. The last item on the list used by poll will contain the
message queue id instead of a file descriptor.

Limitation:
Writes to a directory (that is, file creation and deletion)
do not generate a change message for a registered directory.

PR-URL: https://github.com/libuv/libuv/pull/1311
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-12-15 11:04:16 +01:00
cjihrig
e771ede069
win: set _WIN32_WINNT to 0x0600
This updates the value to Windows Vista.

Fixes: https://github.com/libuv/libuv/issues/1671
PR-URL: https://github.com/libuv/libuv/pull/1675
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Refael Ackermann <refack@gmail.com>
2017-12-08 11:46:00 -05:00
Anna Henningsen
0d6525acae core: add getter/setter functions for easier ABI compat
Add getter/setter functions for the fields of public structs that
might be relevant to e.g. Node.js addons.

Through these methods, ABI compatibility for a subset of the ABI
is easier to achieve, since using them makes code independent
of the exact offsets of these fields.

The intended use case that prompted this are N-API addons for
Node.js, which look for more long-term ABI compatibility guarantees
than typical Node code. With these helper functions, using libuv
directly should no longer be an obstacle for such addons.

PR-URL: https://github.com/libuv/libuv/pull/1657
Refs: https://github.com/nodejs/node/issues/13512
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-12-02 09:51:25 +01:00
cjihrig
c6b7e19f81
Now working on version 1.18.1 2017-11-30 21:15:46 -05:00
cjihrig
1489c98b7f
2017.12.02, Version 1.18.0 (Stable)
Changes since version 1.17.0:

* aix: fix -Wmaybe-uninitialized warning (cjihrig)

* doc: remove note about SIGWINCH on Windows (Bartosz Sosnowski)

* Revert "unix,win: wait for threads to start" (Ben Noordhuis)

* unix,win: add uv_os_getpid() (Bartosz Sosnowski)

* unix: remove incorrect assertion in uv_shutdown() (Jameson Nash)

* doc: fix IRC URL in CONTRIBUTING.md (Matt Harrison)
2017-11-30 21:07:38 -05:00
Bartosz Sosnowski
d708df110a
unix,win: add uv_os_getpid()
Adds a multi platform way to get current process id.

PR-URL: https://github.com/libuv/libuv/pull/1661
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-11-30 20:11:21 -05:00
cjihrig
40a003b4e1
Now working on version 1.17.1 2017-11-23 20:36:59 -05:00
cjihrig
1344d2bb82
2017.11.25, Version 1.17.0 (Stable)
Changes since version 1.16.1:

* unix: avoid malloc() call in uv_spawn() (Ben Noordhuis)

* doc: clarify the description of uv_loop_alive() (Ed Schouten)

* win: map UV_FS_O_EXLOCK to a share mode of 0 (Joran Dirk Greef)

* win: fix build on case-sensitive file systems (Ben Noordhuis)

* win: fix test runner build with mingw64 (Ben Noordhuis)

* win: remove unused variable in test/test-fs.c (Ben Noordhuis)

* zos: add strnlen() implementation (jBarz)

* unix: keep track of bound sockets sent via spawn (jBarz)

* unix,win: wait for threads to start (Ben Noordhuis)

* test: add threadpool init/teardown test (Bartosz Sosnowski)

* test: avoid malloc() in threadpool test (Ben Noordhuis)

* test: lower number of tasks in threadpool test (Ben Noordhuis)

* win: issue memory barrier in uv_thread_join() (Ben Noordhuis)

* ibmi: add support for new platform (Xu Meng)

* test: fix test-spawn compilation (Bartosz Sosnowski)
2017-11-23 20:29:12 -05:00
Xu Meng
bb3d093bbb ibmi: add support for new platform
Support the IBM i platform.

- add a new file src/unix/ibmi.c
- extract the common functions from /src/unix/aix.c into aix-common.c
- update uv.gyp and include/uv-unix.h to enable the new file ibmi.c

PR-URL: https://github.com/libuv/libuv/pull/1601
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2017-11-22 12:18:04 +01:00
Joran Dirk Greef
1c4de1916e win: map UV_FS_O_EXLOCK to a share mode of 0
This is necessary to enable writing past the MBR of a raw block device.

Fixes: https://github.com/libuv/libuv/issues/1605
PR-URL: https://github.com/libuv/libuv/pull/1613
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
2017-11-16 15:14:52 +01:00
cjihrig
6973886ac8
Now working on version 1.16.2 2017-11-10 12:03:09 -05:00
cjihrig
4056fbe464
2017.11.11, Version 1.16.1 (Stable)
Changes since version 1.16.0:

* unix: move net/if.h include (cjihrig)

* win: fix undeclared NDIS_IF_MAX_STRING_SIZE (Nick Logan)
2017-11-10 11:49:42 -05:00
cjihrig
c83f8b91af
unix: move net/if.h include
This commit moves the net/if.h include into src/getaddrinfo.c to
prevent AIX compilation errors. With these symbols exposed
publicly, Node.js compilation failed on AIX by exposing Free(),
which conflicts with another API.

Refs: https://github.com/nodejs/node/pull/16835
Refs: https://github.com/libuv/libuv/pull/1445
PR-URL: https://github.com/libuv/libuv/pull/1622
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-11-09 08:43:22 -05:00
cjihrig
921b030a59
Now working on 1.16.1 2017-11-06 11:31:12 -05:00
cjihrig
d68779f0ea
2017.11.07, Version 1.16.0 (Stable)
Changes since version 1.15.0:

* win: change st_blksize from `2048` to `4096` (Joran Dirk Greef)

* unix,win: add fs open flags, map O_DIRECT|O_DSYNC (Joran Dirk Greef)

* win, fs: fix non-symlink reparse points (Wade Brainerd)

* test: fix -Wstrict-prototypes warnings (Ben Noordhuis)

* unix, windows: map ENOTTY errno (Ben Noordhuis)

* unix: fall back to fsync() if F_FULLFSYNC fails (Joran Dirk Greef)

* unix: do not close invalid kqueue fd after fork (jBarz)

* zos: reset epoll data after fork (jBarz)

* zos: skip fork_threadpool_queue_work_simple (jBarz)

* test: keep platform_output as first test (Bartosz Sosnowski)

* win: fix non-English dlopen error message (Bartosz Sosnowski)

* unix,win: add uv_os_getppid() (cjihrig)

* test: fix const qualification compiler warning (Ben Noordhuis)

* doc: mark uv_default_loop() as not thread safe (rayrase)

* win, pipe: null-initialize stream->shutdown_req (Jameson Nash)

* tty, win: get SetWinEventHook pointer at startup (Bartosz Sosnowski)

* test: no extra new line in skipped test output (Bartosz Sosnowski)

* pipe: allow access from other users (Bartosz Sosnowski)

* unix,win: add uv_if_{indextoname,indextoiid} (Pekka Nikander)
2017-11-06 11:20:52 -05:00
Pekka Nikander
695afe8322
unix,win: add uv_if_{indextoname,indextoiid}
uv_if_indextoname() is used to convert an IPv6 scope_id
to an interface identifier string such as %eth0 or %lo.

uv_if_indextoiid() returns an IPv6 interface identifier.
On Unix it calls uv_if_indextoname(). On Windows it uses
snprintf() to return the numeric interface identifier as
a string.

Refs: https://github.com/nodejs/node/pull/14500
PR-URL: https://github.com/libuv/libuv/pull/1445
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-11-06 09:54:47 -05:00
Bartosz Sosnowski
fd02ab681b pipe: allow access from other users
Adds new uv_pipe_chmod function which can be used to make the pipe
writable or readable by all users.

PR-URL: https://github.com/libuv/libuv/pull/1386
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-11-06 15:45:00 +01:00
cjihrig
e8e6a8a500
unix,win: add uv_os_getppid()
Refs: https://github.com/nodejs/node/issues/14957
PR-URL: https://github.com/libuv/libuv/pull/1610
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2017-11-01 10:32:12 -04:00
Ben Noordhuis
e9cda2cfe7 unix, windows: map ENOTTY errno
PR-URL: https://github.com/libuv/libuv/pull/1582
Refs: https://github.com/libuv/libuv/issues/1579
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-10-05 22:29:18 +02:00
Joran Dirk Greef
4b666bd2d8 unix,win: add fs open flags, map O_DIRECT|O_DSYNC
Define stable cross-platform file open constants so that users can
pass `UV_FS_O_RDWR` rather than `_O_RDWR` (win) or `O_RDWR` (unix).

Map `UV_FS_O_DIRECT`, `UV_FS_O_DSYNC` and `UV_FS_O_SYNC` to
`FILE_FLAG_NO_BUFFERING` and `FILE_FLAG_WRITE_THROUGH` (win).

Fixes: https://github.com/libuv/libuv/issues/1550
PR-URL: https://github.com/libuv/libuv/pull/1567
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
2017-10-03 12:49:54 +02:00
cjihrig
94f507535c
Now working on version 1.15.1 2017-10-02 19:41:06 -04:00
cjihrig
8b69ce1419
2017.10.03, Version 1.15.0 (Stable)
Changes since version 1.14.1:

* unix: limit uv__has_forked_with_cfrunloop to macOS (Kamil Rytarowski)

* win: fix buffer size in uv__getpwuid_r() (tux.uudiin)

* win,tty: improve SIGWINCH support (Bartosz Sosnowski)

* unix: use fchmod() in uv_fs_copyfile() (cjihrig)

* unix: support copying empty files (cjihrig)

* unix: truncate destination in uv_fs_copyfile() (Nick Logan)

* win,build: keep cwd when setting build environment (darobs)

* test: add NetBSD support to test-udp-ipv6.c (Kamil Rytarowski)

* unix: add NetBSD support in core.c (Kamil Rytarowski)

* linux: increase thread stack size with musl libc (Ben Noordhuis)

* netbsd: correct uv_exepath() on NetBSD (Kamil Rytarowski)

* test: clean up semaphore after use (jBarz)

* win,build: bump vswhere_usability_wrapper to 2.0.0 (Refael Ackermann)

* win: let UV_PROCESS_WINDOWS_HIDE hide consoles (cjihrig)

* zos: lock protect global epoll list in epoll_ctl (jBarz)

* zos: change platform name to match python (jBarz)

* android: fix getifaddrs() (Zheng, Lei)

* netbsd: implement uv__tty_is_slave() (Kamil Rytarowski)

* zos: fix readlink for mounts with system variables (jBarz)

* test: sort the tests alphabetically (Sakthipriyan Vairamani)

* windows: fix compilation warnings (Carlo Marcelo Arenas Belón)

* build: avoid -fstrict-aliasing compile option (jBarz)

* win: remove unused variables (Carlo Marcelo Arenas Belón)

* unix: remove unused variables (Sakthipriyan Vairamani)

* netbsd: disable poll_bad_fdtype on NetBSD (Kamil Rytarowski)

* netbsd: use uv__cloexec and uv__nonblock (Kamil Rytarowski)

* test: fix udp_multicast_join6 on NetBSD (Kamil Rytarowski)

* unix,win: add uv_mutex_init_recursive() (Scott Parker)

* netbsd: do not exclude IPv6 functionality (Kamil Rytarowski)

* fsevents: watch files with fsevents on macos 10.7+ (Ben Noordhuis)

* unix: retry on ENOBUFS in sendmsg(2) (Kamil Rytarowski)
2017-10-02 19:30:27 -04:00
Scott Parker
ec96b55438
unix,win: add uv_mutex_init_recursive()
Support the creation of recursive mutexes on Unix. A matching
API is added on Windows, however mutexes on Windows are always
recursive.

Refs: https://github.com/libuv/libuv/issues/1022
PR-URL: https://github.com/libuv/libuv/pull/1555
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-10-02 10:01:09 -04:00
cjihrig
1a682cb7c0
Now working on version 1.14.2 2017-09-06 09:50:12 -04:00
cjihrig
b0f9fb2a07
2017.09.07, Version 1.14.1 (Stable)
Changes since version 1.14.0:

* fs, win: add support for user symlinks (Bartosz Sosnowski)

* cygwin: include uv-posix.h header (Joel Winarske)

* zos: fix semaphore initialization (jBarz)

* zos: improve loop_count benchmark performance (jBarz)

* zos, test: flush out the oob data in callback (jBarz)

* unix,win: check for bad flags in uv_fs_copyfile() (cjihrig)

* unix: modify argv[0] when process title is set (Matthew Taylor)

* unix: don't use req->loop in uv__fs_copyfile() (cjihrig)

* doc: fix a trivial typo (Vladimír Čunát)

* android: fix uv_cond_timedwait on API level < 21 (Gergely Nagy)

* win: add uv__once_init() calls (Bartosz Sosnowski)

* unix,windows: init all requests in fs calls (cjihrig)

* unix,windows: return UV_EINVAL on NULL fs reqs (cjihrig)

* windows: add POST macro to fs functions (cjihrig)

* unix: handle partial sends in uv_fs_copyfile() (A. Hauptmann)

* Revert "win, test: fix double close in test runner" (Bartosz
  Sosnowski)

* win, test: remove surplus CloseHandle (Bartosz Sosnowski)
2017-09-06 09:41:30 -04:00
cjihrig
c8ee8bef9b
Now working on version 1.14.1 2017-08-16 10:21:47 -04:00
cjihrig
e0d31e9e21
2017.08.17, Version 1.14.0 (Stable)
Changes since version 1.13.1:

* unix: check for NULL in uv_os_unsetenv for parameter name (André
  Klitzing)

* doc: add thread safety warning for process title (Matthew Taylor)

* unix: always copy process title into local buffer (Matthew Taylor)

* poll: add support for OOB TCP and GPIO interrupts (CurlyMoo)

* win,build: fix appveyor properly (Refael Ackermann)

* win: include filename in dlopen error message (Ben Noordhuis)

* aix: add netmask, mac address into net interfaces (Gireesh Punathil)

* unix, windows: map EREMOTEIO errno (Ben Noordhuis)

* unix: fix wrong MAC of uv_interface_address (XadillaX)

* win,build: fix building from Windows SDK or VS console (Saúl Ibarra
  Corretgé)

* github: fix link to help repo in issue template (Ben Noordhuis)

* zos: remove nonexistent include from autotools build (Saúl Ibarra
  Corretgé)

* misc: remove reference to pthread-fixes.h from LICENSE (Saúl Ibarra
  Corretgé)

* docs: fix guide source code example paths (Anticrisis)

* android: fix compilation with new NDK versions (Saúl Ibarra Corretgé)

* misc: add android-toolchain to .gitignore (Saúl Ibarra Corretgé)

* win, fs: support unusual reparse points (Bartosz Sosnowski)

* android: fix detection of pthread_condattr_setclock (Saúl Ibarra
  Corretgé)

* android: remove no longer needed check (Saúl Ibarra Corretgé)

* doc: update instructions for building on Android (Saúl Ibarra
  Corretgé)

* win, process: support semicolons in PATH variable (Bartosz Sosnowski)

* doc: document uv_async_(init|send) return values (Ben Noordhuis)

* doc: add Android as a tier 3 supported platform (Saúl Ibarra Corretgé)

* unix: add missing semicolon (jBarz)

* win, test: fix double close in test runner (Bartosz Sosnowski)

* doc: update supported windows version baseline (Ben Noordhuis)

* test,zos: skip chown root test (jBarz)

* test,zos: use gid=-1 to test spawn_setgid_fails (jBarz)

* zos: fix hr timer resolution (jBarz)

* android: fix blocking recvmsg due to netlink bug (Jacob Segal)

* zos: read more accurate rss info from RSM (jBarz)

* win: allow bound/connected socket in uv_tcp_open() (Maciej Szeptuch
  (Neverous))

* doc: differentiate SmartOS and SunOS support (cjihrig)

* unix: make uv_poll_stop() remove fd from pollset (Ben Noordhuis)

* unix, windows: add basic uv_fs_copyfile() (cjihrig)
2017-08-16 10:11:33 -04:00
cjihrig
766d7e9c0b
unix, windows: add basic uv_fs_copyfile()
Fixes: https://github.com/libuv/libuv/issues/925
PR-URL: https://github.com/libuv/libuv/pull/1465
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-08-15 10:43:49 -04:00
Saúl Ibarra Corretgé
7dabd57af4 android: fix compilation with new NDK versions
Fixes compiling with Android NDK when using Unified Headers (default
since r15).

Fixes: https://github.com/libuv/libuv/issues/1417
PR-URL: https://github.com/libuv/libuv/pull/1433
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2017-07-25 22:50:39 +02:00
Ben Noordhuis
8e76306ec2 unix, windows: map EREMOTEIO errno
PR-URL: https://github.com/libuv/libuv/pull/1424
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2017-07-17 13:31:58 +02:00
CurlyMoo
d731fd1bd9 poll: add support for OOB TCP and GPIO interrupts
Out-of-band TCP messages are used for TCP data
transmission outside (outband) the inbound TCP
data. These packets are sent with an
"urgent pointer", but previously discarded.

Additionally, when using (e)poll a POLLPRI is
triggered when an interrupt signal is received
on GPIO capable systems such as the Raspberry Pi.

PR-URL: https://github.com/libuv/libuv/pull/1040
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2017-07-12 23:04:34 +02:00
cjihrig
d63030b0ba Now working on version 1.13.2 2017-07-06 18:49:48 -04:00
cjihrig
2bb4b68758 2017.07.07, Version 1.13.1 (Stable)
Changes since version 1.13.0:

* Now working on version 1.13.1 (cjihrig)

* build: workaround AppVeyor quirk (Refael Ackermann)
2017-07-06 18:42:36 -04:00
cjihrig
a7aa057113 Now working on version 1.13.1 2017-07-05 16:47:53 -04:00
cjihrig
8342fcaab8 2017.07.06, Version 1.13.0 (Stable)
Changes since version 1.12.0:

* Now working on version 1.12.1 (cjihrig)

* unix: avoid segfault in uv_get_process_title (Michele Caini)

* build: add a comma to uv.gyp (Gemini Wen)

* win: restore file pos after positional read/write (Bartosz Sosnowski)

* unix,stream: return error on closed handle passing (Santiago Gimeno)

* unix,benchmark: use fd instead of FILE* after fork (jBarz)

* zos: avoid compiler warnings (jBarz)

* win,pipe: race condition canceling readfile thread (Jameson Nash)

* sunos: filter out non-IPv4/IPv6 interfaces (Sebastian Wiedenroth)

* sunos: fix cmpxchgi and cmpxchgl type error (Sai Ke WANG)

* unix: reset signal disposition before execve() (Ben Noordhuis)

* unix: reset signal mask before execve() (Ben Noordhuis)

* unix: fix POLLIN assertion on server read (jBarz)

* zos: use stckf builtin for high-res timer (jBarz)

* win,udp: implements uv_udp_try_send (Barnabas Gema)

* win,udp: return UV_EINVAL instead of aborting (Romain Caire)

* freebsd: replace kvm with sysctl (Robert Ayrapetyan)

* aix: fix un-initialized pointer field in fs handle (Gireesh Punathil)

* win,build: support building with VS2017 (Refael Ackermann)

* doc: add instructions for building on Windows (Refael Ackermann)

* doc: format README (Refael Ackermann)
2017-07-05 11:55:39 -04:00
cjihrig
42bf398b80 Now working on version 1.12.1 2017-05-30 12:36:19 -04:00
cjihrig
d6ac141ac6 2017.05.31, Version 1.12.0 (Stable)
Changes since version 1.11.0:

* Now working on version 1.11.1 (cjihrig)

* test: fix tests on OpenBSD (Santiago Gimeno)

* test: fix -Wformat warning (Santiago Gimeno)

* win,fs: avoid double freeing uv_fs_event_t.dirw (Vladimir Matveev)

* unix: remove unused code in `uv__io_start` (Fedor Indutny)

* signal: add uv_signal_start_oneshot method (Santiago Gimeno)

* unix: factor out reusable POSIX hrtime impl (Brad King)

* unix,win: add uv_os_{get,set,unset}env() (cjihrig)

* win: add uv__convert_utf8_to_utf16() (cjihrig)

* docs: improve UV_ENOBUFS scenario documentation (cjihrig)

* unix: return UV_EINVAL for NULL env name (jBarz)

* unix: filter getifaddrs results consistently (Brad King)

* unix: factor out getifaddrs result filter (Brad King)

* unix: factor out reusable BSD ifaddrs impl (Brad King)

* unix: use union to follow strict aliasing rules (jBarz)

* unix: simplify async watcher dispatch logic (Ben Noordhuis)

* samples: update timer callback prototype (Ben Noordhuis)

* unix: make loops and watchers usable after fork() (Jason Madden)

* win: free uv__loops once empty (cjihrig)

* tools: add make_dist_html.py script (Ben Noordhuis)

* win,sunos: stop handle on uv_fs_event_start() err (cjihrig)

* unix,windows: refactor request init logic (Ben Noordhuis)

* win: fix memory leak inside uv__pipe_getname (A. Hauptmann)

* fsevent: support for files without short name (Bartosz Sosnowski)

* doc: fix multiple doc typos (Jamie Davis)

* test,osx: fix flaky kill test (Santiago Gimeno)

* unix: inline uv_pipe_bind() err_bind goto target (cjihrig)

* unix,test: deadstore fixes (Rasmus Christian Pedersen)

* win: fix memory leak inside uv_fs_access() (A. Hauptmann)

* doc: fix docs/src/fs.rst build warning (Daniel Bevenius)

* doc: minor grammar fix in Installation section (Daniel Bevenius)

* doc: suggestions for design page (Daniel Bevenius)

* doc: libuv does not touch uv_loop_t.data (Ben Noordhuis)

* github: add ISSUE_TEMPLATE.md (Ben Noordhuis)

* doc: add link to libuv/help to README (Ben Noordhuis)

* udp: fix fast path in uv_udp_send() on unix (Fedor Indutny)

* test: add test for uv_udp_send() fix (Trevor Norris)

* doc: fix documentation for uv_handle_t.type (Daniel Kahn Gillmor)

* zos: use proper prototype for epoll_init() (Ben Noordhuis)

* doc: rename docs to "libuv documentation" (Saúl Ibarra Corretgé)

* doc: update copyright years (Saúl Ibarra Corretgé)

* doc: move TOC to a dedicated document (Saúl Ibarra Corretgé)

* doc: move documentation section up (Saúl Ibarra Corretgé)

* doc: move "upgrading" to a standalone document (Saúl Ibarra Corretgé)

* doc: add initial version of the User Guide (Saúl Ibarra Corretgé)

* doc: removed unused file (Saúl Ibarra Corretgé)

* doc: update guide/about and mention new maintainership (Saúl Ibarra
  Corretgé)

* doc: remove licensing note from guide/about (Saúl Ibarra Corretgé)

* doc: add warning note to user guide (Saúl Ibarra Corretgé)

* doc: change license to CC BY 4.0 (Saúl Ibarra Corretgé)

* doc: remove ubvook reference from README (Saúl Ibarra Corretgé)

* doc: add code samples from uvbook (unadapted) (Saúl Ibarra Corretgé)

* doc: update supported linux/glibc baseline (Ben Noordhuis)

* win: avoid leaking pipe handles to child processes (Jameson Nash)

* win,test: support stdout output larger than 1kb (Bartosz Sosnowski)

* win: remove __declspec(inline) from atomic op (Keane)

* test: fix VC++ compilation warning (Rasmus Christian Pedersen)

* build: add -Wstrict-prototypes (Jameson Nash)

* zos: implement uv__io_fork, skip fs event tests (jBarz)

* unix: do not close udp sockets on bind error (Marc Schlaich)

* unix: remove FSEventStreamFlushSync() call (cjihrig)

* build,openbsd: remove kvm-related code (James McCoy)

* test: fix flaky tcp-write-queue-order (Santiago Gimeno)

* unix,win: add uv_os_gethostname() (cjihrig)

* zos: increase timeout for tcp_writealot (jBarz)

* zos: do not inline OOB data by default (jBarz)

* test: fix -Wstrict-prototypes compiler warnings (Ben Noordhuis)

* unix: factor out reusable no-proctitle impl (Brad King)

* test: factor out fsevents skip explanation (Brad King)

* test: skip fork fsevent cases when lacking support (Brad King)

* unix: factor out reusable no-fsevents impl (Brad King)

* unix: factor out reusable sysinfo memory lookup (Brad King)

* unix: factor out reusable sysinfo loadavg impl (Brad King)

* unix: factor out reusable procfs exepath impl (Brad King)

* unix: add a uv__io_poll impl using POSIX poll(2) (Brad King)

* cygwin: implement support for cygwin and msys2 (Brad King)

* cygwin: recognize EOF on named pipe closure (Brad King)

* cygwin: fix uv_pipe_connect report of ENOTSOCK (Brad King)

* cygwin: disable non-functional ipc handle send (Brad King)

* test: skip self-connecting tests on cygwin (Brad King)

* doc: mark uv_loop_fork() as experimental (cjihrig)

* doc: add bzoz to maintainers (Bartosz Sosnowski)

* doc: fix memory leak in tcp-echo-server example (Bernardo Ramos)

* win: make uv__get_osfhandle() public (Juan Cruz Viotti)

* doc: use valid pipe name in pipe-echo-server (Bernardo Ramos)
2017-05-30 12:18:19 -04:00
Juan Cruz Viotti
e133923e93 win: make uv__get_osfhandle() public
The uv__get_osfhandle() function is a private functio of the
Windows subsystem, and its used to get a Windows HANDLE out
of a file descriptor number.

The motivation behind making this function public is to
allow Node.js programs to pass file descriptors created
using fs.open() to native Node.js C++ add-ons, and be able to
successfully convert them to Windows HANDLEs.

Refs: https://github.com/libuv/libuv/pull/1166
Refs: https://github.com/nodejs/node/issues/6369
Fixes: https://github.com/libuv/libuv/issues/1291
PR-URL: https://github.com/libuv/libuv/pull/1323
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-05-30 11:53:31 -04:00
Brad King
6398251aff cygwin: implement support for cygwin and msys2
Cygwin and MSYS2 are POSIX layers implemented on top of Windows.
Use our POSIX `poll(2)` implementation of our poll abstraction.
For most other components we already have dedicated sources
implementing them in terms of APIs available on Cygwin or
providing non-implementations of components not supported.

This leaves only three components that need Cygwin-specific
implementations:

* uv_uptime: implement using sysinfo
* uv_resident_set_memory: add a placeholder returning UV_ENOSYS
* uv_cpu_info: add a placeholder returning UV_ENOSYS

Update our test suite to account for features not available
due to Cygwin platform limitations or our placeholders.

PR-URL: https://github.com/libuv/libuv/pull/1312
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-05-21 16:12:21 +02:00
Brad King
c108137d7c unix: add a uv__io_poll impl using POSIX poll(2)
POSIX defines `poll()` as a portable way to wait on file descriptors.
Use it to provide an implementation of our poll abstraction for use
on platforms that do not provide a more specialized polling method.

PR-URL: https://github.com/libuv/libuv/pull/1312
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-05-21 16:12:19 +02:00
cjihrig
d8cd08bd98 unix,win: add uv_os_gethostname()
Fixes: https://github.com/libuv/libuv/issues/1315
PR-URL: https://github.com/libuv/libuv/pull/1342
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
2017-05-18 10:27:47 -04:00