Commit Graph

927 Commits

Author SHA1 Message Date
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
Jason Madden
fd7ce57f2b unix: make loops and watchers usable after fork()
Added the uv_loop_fork() API that must be called in a child process to
continue using an existing loop. Internally this calls a uv__io_fork
function for each supported platform, similar to the way
uv__platform_loop_init works.

After this call, existing and new IO, async and signal watchers will
contiue working as before on all platforms, as will the
threadpool (although any threads it was using are of course gone).

On Linux and BSDs that use kqueue, existing and new fsevent watchers
will also continue to work as expected. On OS X, though, directory
fsevents will not be able to use the optimized CoreFoundation path if
they had already been used in the parent process, instead falling back
to the kqueue path used on other BSDs.

Existing fsevent watchers will not function on AIX or SunOS. This
could be relatively easily fixed by someone with AIX knowledge in the
future, but SunOS will require some additional work to keep track if
the watchers.

A new test file, test/test-fork.c, was added to contain fork-related
tests to verify functionality in the child process.

PR-URL: https://github.com/libuv/libuv/pull/846
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2017-03-21 12:23:44 +01:00
Ben Noordhuis
5fc8aecd81 unix: simplify async watcher dispatch logic
Remove the unused `nevents` parameter from `uv__async_event()`
and remove the indirection of having a separate `uv__async`
type.  There is only one instance per event loop these days.

This incidentally removes the `assert(n == sizeof(val))` in a
Linux-specific code path that some users seem to hit from time
to time.  The cause is not well-understood and I've never been
able to reproduce it myself.  Presumably libuv gets an EAGAIN
when trying to read from the eventfd but when and why that
happens is unclear.

Since the byte count is unused, removing the assert seems safe.
Worst case, libuv sometimes iterates over the async watcher list
when it doesn't have to.

Fixes: https://github.com/libuv/libuv/issues/1171
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Supersedes: https://github.com/libuv/libuv/pull/1214
2017-03-15 10:03:10 +01:00
cjihrig
ee02f60c90 unix,win: add uv_os_{get,set,unset}env()
These functions are used to create, retrieve, update, and delete
environment variables.

Fixes: https://github.com/libuv/libuv/issues/1198
PR-URL: https://github.com/libuv/libuv/pull/1234
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2017-03-08 20:39:33 -05:00
Santiago Gimeno
45616f542d
signal: add uv_signal_start_oneshot method
It behaves as `uv_signal_start` but it resets the signal handler as soon
as the signal is received.

Fixes: https://github.com/libuv/libuv/issues/1104
PR-URL: https://github.com/libuv/libuv/pull/1106
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
2017-02-28 14:16:54 +01:00
cjihrig
c42d31ba53 Now working on version 1.11.1 2017-01-31 19:50:51 -05:00
cjihrig
7452ef4e06 2017.02.02, Version 1.11.0 (Stable)
Changes since version 1.10.2:

* Now working on version 1.10.3 (cjihrig)

* win: added fcntl.h to uv-win.h (Michele Caini)

* unix: move function call out of assert (jBarz)

* fs: cleanup uv__fs_scandir (Santiago Gimeno)

* fs: fix crash in uv_fs_scandir_next (muflub)

* win,signal: fix potential deadlock (Bartosz Sosnowski)

* unix: use async-signal safe functions between fork and exec (jBarz)

* sunos: fix SUNOS_NO_IFADDRS build (Ben Noordhuis)

* zos: make platform functional (John Barboza)

* doc: add repitition qualifier to version regexs (Daniel Bevenius)

* zos: use gyp OS label "os390" on z/OS (John Barboza)

* aix: enable uv_get/set_process_title (Howard Hellyer)

* zos: use built-in proctitle implementation (John Barboza)

* Revert "darwin: use clock_gettime in macOS 10.12" (Chris Araman)

* win,test: don't write uninitialized buffer to tty (Bert Belder)

* win: define ERROR_ELEVATION_REQUIRED for MinGW (Richard Lau)

* aix: re-enable fs watch facility (Gireesh Punathil)
2017-01-31 19:38:56 -05:00
John Barboza
011e02e3e5 zos: make platform functional
Fix all functional test cases:

* use PLO compare,swap,store for atomic instruction
* do not use semaphore.h
* use xplink flag when linking
* scandir implementation
* nanosleep implementation
* add proctitle
* uv_loadavg
* uv_fs_event_init/start
* uv_fs_event_stop
* uv_exepath using __getthent syscall
* read free/total memory from mvs data areas
* uv_resident_set_memory implementation
* network interfaces implementation
* cpu_info implementation
* implement uv__hrtime
* make uv__fs_mkdtemp implementation
* epoll implementation for asyncio
* uv__fs_event_close implementation
* set process title
* read ancillary data that remains on queue
* ancillary data
* implement uv__fs_access
* use /dev/urandom for temporary directory name
* disable proctitle on zos completely

PR-URL: https://github.com/libuv/libuv/pull/1037
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2017-01-18 08:42:59 -06:00
Michele Caini
2e5ad25cad
win: added fcntl.h to uv-win.h
PR-URL: https://github.com/libuv/libuv/pull/1130
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2017-01-14 21:38:44 +01:00
cjihrig
65751b5cd6 Now working on version 1.10.3 2017-01-09 13:56:05 -05:00
cjihrig
cb9f579a45 2017.01.10, Version 1.10.2 (Stable)
Changes since version 1.10.1:

* Now working on version 1.10.2 (cjihrig)

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

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

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

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

* win: fix comment in quote_cmd_arg (Eric Sciple)

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

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

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

* win: map ERROR_ELEVATION_REQUIRED to UV_EACCES (Richard Lau)

* win: fix free() on bad input in uv_getaddrinfo() (Ben Noordhuis)
2017-01-09 13:42:49 -05:00
cjihrig
a2a85f823f Now working on version 1.10.2 2016-11-16 13:19:32 -05:00
cjihrig
2e49e332bd 2016.11.17, Version 1.10.1 (Stable)
Changes since version 1.10.0:

* Now working on version 1.10.1 (cjihrig)

* win: fix anonymous union syntax (Brad King)

* unix: use uv__is_closing everywhere (Santiago Gimeno)

* win: add missing break statement (cjihrig)

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

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

* doc: add cjihrig alternative GPG ID (cjihrig)

* Revert "win,tty: add support for ANSI codes in win10 v1511" (Ben
  Noordhuis)
2016-11-16 13:03:50 -05:00
cjihrig
531f06ecfe Now working on version 1.10.1 2016-10-24 10:24:20 -04:00
cjihrig
c8a373c729 2016.10.25, Version 1.10.0 (Stable)
Changes since version 1.9.1:

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

* doc: add cjihrig GPG ID (cjihrig)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* doc: add iWuzHere GPG ID (Imran Iqbal)

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

* build: fix build on DragonFly (Michael Neumann)

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

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

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

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

* test: remove unused RETURN_TODO macro (Ben Noordhuis)

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

* doc: update coding style link (Imran Iqbal)

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

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

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

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

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

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

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

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

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

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

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

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

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

* unix: fix errno and retval conflict (liuxiaobo)

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

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

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

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

* win: fix compilation on mingw (Bartosz Sosnowski)

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

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

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

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

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

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

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

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

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

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

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

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

* build: GNU/kFreeBSD support (Jeffrey Clark)

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

* zos: use pthread helper functions (John Barboza)

* zos: implement uv__fs_futime (John Barboza)

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

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

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

* test: refactor fs_event_close_in_callback (Julien Gilli)

* zos: implement uv__io_check_fd (John Barboza)

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

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

* doc: add santigimeno to maintainers (Santiago Gimeno)

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

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

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

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

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

* test: improve spawn_setuid_setgid test (Santiago Gimeno)

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

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

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

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

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

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

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

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

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

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

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

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

* test: fix fs_fstat on Android (Vit Gottwald)

* win, test: fix fs_event_watch_dir_recursive (Bartosz Sosnowski)

* doc: add description of uv_handle_type (Vit Gottwald)

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

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

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

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

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

* test: fix tcp_close_while_connecting CI failures (Ben Noordhuis)

* test: make threadpool_cancel_single deterministic (Ben Noordhuis)

* test: make threadpool saturation reliable (Ben Noordhuis)

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

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

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

* win: remove unused static variables (Ben Noordhuis)

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

* signal: replace pthread_once with uv_once (Santiago Gimeno)

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

* common: fix unused variable warning (Brad King)
2016-10-24 09:52:33 -04:00
Philippe Laferriere
f1863dae6b unix,win: add uv_translate_sys_error() public API
uv_translate_sys_error() was a private function for Windows.
This commit adds an equivalent function on other platforms, and
exposes it as public API.

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

Fixes: https://github.com/libuv/libuv/issues/79
PR-URL: https://github.com/libuv/libuv/pull/1060
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-10-16 17:47:42 -04:00
Brad King
cfc192212e win: fix winapi function pointer typedef syntax
Move the `PASCAL` calling convention marker from:

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

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

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

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

PR-URL: https://github.com/libuv/libuv/pull/1075
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-10-14 07:30:08 +02:00
Saúl Ibarra Corretgé
5d96277834 unix: always define pthread barrier fallback pad
Fixes: https://github.com/libuv/libuv/issues/1019
PR-URL: https://github.com/libuv/libuv/pull/1020
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-08-27 11:06:19 +02:00
Jeffrey Clark
0a4b51fcb4 build: GNU/kFreeBSD support
autotools support only, gvp does not support kfreebsd detection.

PR-URL: https://github.com/libuv/libuv/pull/960
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-08-20 08:55:30 +02:00
John Barboza
1cff5b7557 zos: add support for new platform
- zos: disable test cases not applicable
- zos: build options
- zos: semaphore implementation
- zos: use compare and swap builtins
- zos: struct rusage not the same as other platforms
- zos: backlog<=0 produces undefined behaviour
    Will redefine backlog in the following way
    * if backlog == 0, set it to 1
    * if backlog < 0, set it to SOMAXCONN
- zos: define IMAXBEL as empty flag and implement uv__tty_make_raw
- zos: use udp multicast operations from aix
- zos: ESC in ebcdic
- zos: use LIBPATH for dynamic linker path
- zos: uv_udp_set_ttl only works for ipv6
- zos: increase pthread stack size by factor of 4
- zos: return ENODEV instead of ENXIO errors for setsockopt
- zos: use uv_cond_init the same way as aix
- test: enable oob test for zos
- zos: return EINVAL for zos error code EOPNOTSUPP

PR-URL: https://github.com/libuv/libuv/pull/937
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-08-19 01:34:29 +02:00
Saúl Ibarra Corretgé
67f4d1c531 Now working on version 1.9.2 2016-05-16 23:49:30 +02:00
Saúl Ibarra Corretgé
d989902ac6 2016.05.17, Version 1.9.1 (Stable)
Changes since version 1.9.0:

* test: handle root home directories (cjihrig)

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

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

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

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

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

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

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

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

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

* test: fix fs_event_watch_file_current_dir for AIX (Imran Iqbal)

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

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

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

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

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

* unix: remove unneeded SAVE_ERRNO wrappers (Ben Noordhuis)

* test: skip fs_event_close_in_callback on AIX (Imran Iqbal)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* test: skip emfile on AIX (Imran Iqbal)

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

* common: release uv_fs_scandir() array (cjihrig)

* win: call uv__fs_scandir_cleanup() (cjihrig)

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

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

* win,tty: restore cursor after canceling line read (Alexis Campailla)
2016-05-16 23:22:19 +02:00
João Reis
349aa6c0dd win,tty: don't duplicate handle for line reads
Since we cancel ReadConsole by sending a newline, the duplicate
handle is no longer necessary.

PR-URL: https://github.com/libuv/libuv/pull/866
Reviewed-by: Bert Belder <bertbelder@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-05-16 23:05:50 +02:00
Kári Tristan Helgason
f57bfd4dca unix: fix bug in barrier fallback implementation
There was a memory corruption issue with the pthread barrier
implementation on android, where a barrier could still be in use by one
thread when being freed by another.

This fixes that issue and adds lots of missing error handling.

This implementation is now also used for the OSX fallback.

Fixes: https://github.com/libuv/libuv/issues/615
PR-URL: https://github.com/libuv/libuv/pull/790
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-04-26 09:35:47 +02:00
Saúl Ibarra Corretgé
d476185bb3 Now working on version 1.9.1 2016-04-07 07:52:59 -03:00
Saúl Ibarra Corretgé
229b3a4cc1 2016.04.08, Version 1.9.0 (Stable)
Changes since version 1.8.0:

* win: wait for full timeout duration (João Reis)

* unix: fix support for uClibc-ng (Martin Bark)

* doc: indicate where new test files need to be added (Dave)

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

* fs: don't nullify req->bufs on EINTR (Dave)

* osx: set the default thread stack size to RLIMIT_STACK (Saúl Ibarra
  Corretgé)

* build: invoke libtoolize with --copy (Ben Noordhuis)

* test: fixup eintr_handling (Saúl Ibarra Corretgé)

* osx: avoid compilation warning with Clang (Saúl Ibarra Corretgé)

* test,win: fix compilation with shared lib (Alexis Murzeau)

* test: fix race condition in pipe-close-stdout (Imran Iqbal)

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

* ios: fix undefined PTHREAD_STACK_MIN (Didiet)

* test: fix threadpool_multiple_event_loops for AIX (Imran Iqbal)

* unix: report errors for unpollable fds (Ben Noordhuis)

* win: fix watching root files (Nicholas Vavilov)

* build,win: print the Visual Studio version in use (Saúl Ibarra
  Corretgé)

* build,win: remove unneeded condition from GYP file (Saúl Ibarra
  Corretgé)

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

* test: use uv_loop_close and assert its result (Nan Xiang)

* build: map 'AMD64' host arch to 'x64' (Ben Noordhuis)

* osx: protected use of potentially undefined macro (Samuel Lorétan)

* linux: fix compilation with musl (Saúl Ibarra Corretgé)

* doc: describe how to make release builds on Unix (Saúl Ibarra
  Corretgé)

* doc: add missing link in README (Saúl Ibarra Corretgé)

* build: python 2.x/3.x consistent print usage (Rasmus Christian
  Pedersen)

* test: assume no IPv6 if interfaces cannot be listed (Nan Xiang)

* darwin: replace F_FULLFSYNC with fdatasync syscall (Saúl Ibarra
  Corretgé)

* doc: add missing write callback to example (Nándor István Krácser)

* build: compile with -D_THREAD_SAFE on AIX (Imran Iqbal)

* test: fix threadpool_multiple_event_loops on PPC (Imran Iqbal)

* test: reduce timeout in tcp_close_while_connecting (Imran Iqbal)

* unix, win: consistently null-terminate buffers (Saúl Ibarra Corretgé)

* unix, win: count null byte on UV_ENOBUFS (Saúl Ibarra Corretgé)

* test: fix deadlocks in uv_cond_wait (Katsutoshi Horie)

* linux: fix cpu count (Lukasz Jagiello)

* unix: fix uv__handle_type for AIX (Imran Iqbal)

* linux: call fclose(), fix fdopen() memory leak (Ben Noordhuis)

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

* unix: fix compile error in Android using bionic (Robert Chiras)

* linux: add braces to multi-statement if (Kári Tristan Helgason)

* doc: add @cjihrig as a maintainer (Saúl Ibarra Corretgé)

* unix: add fork-safe open file function (Kári Tristan Helgason)

* linux: replace calls to fopen with uv__open_file (Kári Tristan
  Helgason)

* linux: remove redundant call to rewind() (Krishnaraj Bhat)

* win: remove duplicated code when processing fsevents (Saúl Ibarra
  Corretgé)

* test: fix poll_bad_fdtype for AIX (Imran Iqbal)

* linux: fix error checking in uv__open_file (Saúl Ibarra Corretgé)

* poll: add UV_DISCONNECT event (Santiago Gimeno)

* fs: realpath: fix string size before converting (Yuval Brik)

* win: use native APIs for UTF conversions (cjihrig)

* doc: clarify uv_loop_close() (Ben Noordhuis)

* unix: retry ioctl(TIOCGWINSZ) on EINTR (Ben Noordhuis)

* win,build: remove unused build defines (Saúl Ibarra Corretgé)

* win: fix buffer overflow in fs events (Joran Dirk Greef)

* win: fix uv_relative_path and remove dead branch (Joran Dirk Greef)

* unix: use open(2) with O_CLOEXEC on OS X (Kári Tristan Helgason)

* test: add missing copyright header (cjihrig)

* aix: fix 'POLLRDHUP undeclared' build error (Ben Noordhuis)

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

* process: fix uv_spawn edge-case (Santiago Gimeno)

* test: use %ld for printing uid/gid (Ben Noordhuis)

* aix: fix ahafs implementation (Imran Iqbal)

* aix: do not store absolute path to ahafs (Imran Iqbal)

* process: close process pipes safely (Santiago Gimeno)

* unix: open ttyname instead of /dev/tty (Enno Boland)

* unix: remove outdated comment (Kári Tristan Helgason)
2016-04-07 12:14:56 +02:00
cjihrig
217f81b6a1 unix,win: add uv_get_passwd()
This commit adds the uv_get_passwd() function, which returns a
subset of the current effective user's password file entry.

Refs: https://github.com/libuv/libuv/issues/11
Fixes: https://github.com/libuv/libuv/issues/731
PR-URL: https://github.com/libuv/libuv/pull/742
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-03-29 08:13:59 -04:00
cjihrig
f04d5fc3b9 win: use native APIs for UTF conversions
This commit replaces uv_utf16_to_utf8() and uv_utf8_to_utf16()
with calls to the native Windows API equivalents.

Refs: https://github.com/libuv/libuv/pull/672#discussion_r49049746
PR-URL: https://github.com/libuv/libuv/pull/762
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-03-18 12:40:57 -04:00
Santiago Gimeno
c7c8e916b8 poll: add UV_DISCONNECT event
It allows detecting the remote socket closing the connection. It's
emitted when `EPOLLRDHUP`(Linux), `EV_EOF`(BSD), `POLLRDHUP`(Solaris,
AIX) and `AFD_POLL_DISCONNECT`(Windows) events are received.

PR-URL: https://github.com/libuv/libuv/pull/691
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-03-15 23:39:49 +01:00
cjihrig
c0fa2e7518 unix,win: add uv_os_tmpdir()
PR-URL: https://github.com/libuv/libuv/pull/672
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2016-01-21 09:11:56 +01:00
Saúl Ibarra Corretgé
61f13a6d5e Now working on version 1.8.1 2015-12-14 21:07:52 +01:00
Saúl Ibarra Corretgé
5467299450 2015.12.15, Version 1.8.0 (Stable)
Changes since version 1.7.5:

* unix: fix memory leak in uv_interface_addresses (Jianghua Yang)

* unix: make uv_guess_handle work properly for AIX (Gireesh Punathil)

* fs: undo uv__req_init when uv__malloc failed (Jianghua Yang)

* build: remove unused 'component' GYP option (Saúl Ibarra Corretgé)

* include: remove duplicate extern declaration (Jianghua Yang)

* win: use the MSVC provided snprintf where possible (Jason Williams)

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

* win: fix compilation with VS < 2012 (Ryan Johnston)

* stream: support empty uv_try_write on unix (Fedor Indutny)

* unix: fix request handle leak in uv__udp_send (Jianghua Yang)

* src: replace QUEUE_SPLIT with QUEUE_MOVE (Ben Noordhuis)

* unix: use QUEUE_MOVE when iterating over lists (Ben Noordhuis)

* unix: squelch harmless valgrind warning (Ben Noordhuis)

* test: don't abort on setrlimit() failure (Ben Noordhuis)

* unix: only undo fs req registration in async mode (Ben Noordhuis)

* unix: fix uv__getiovmax return value (HungMingWu)

* unix: make work with Solaris Studio. (Adam Stylinski)

* test: fix fs_event_watch_file_currentdir flakiness (Santiago Gimeno)

* unix: skip prohibited syscalls on tvOS and watchOS (Nathan Corvino)

* test: use FQDN in getaddrinfo_fail test (Wink Saville)

* docs: clarify documentation of uv_tcp_init_ex (Andrius Bentkus)

* win: fix comment (Miodrag Milanovic)

* doc: fix typo in README (Angel Leon)

* darwin: abort() if (un)locking fs mutex fails (Ben Noordhuis)

* pipe: enable inprocess uv_write2 on Windows (Louis DeJardin)

* win: properly return UV_EBADF when _close() fails (Nicholas Vavilov)

* test: skip process_title for AIX (Imran Iqbal)

* misc: expose handle print APIs (Petka Antonov)

* include: add stdio.h to uv.h (Saúl Ibarra Corretgé)

* misc: remove unnecessary null pointer checks (Ian Kronquist)

* test,freebsd: skip udp_dual_stack if not supported (Santiago Gimeno)

* linux: don't retry dup2/dup3 on EINTR (Ben Noordhuis)

* unix: don't retry dup2/dup3 on EINTR (Ben Noordhuis)

* test: fix -Wtautological-pointer-compare warnings (Saúl Ibarra
  Corretgé)

* win: map ERROR_BAD_PATHNAME to UV_ENOENT (Tony Kelman)

* test: fix test/test-tty.c for AIX (Imran Iqbal)

* android: support api level less than 21 (kkdaemon)

* fsevents: fix race on simultaneous init+close (Fedor Indutny)

* linux,fs: fix p{read,write}v with a 64bit offset (Saúl Ibarra
  Corretgé)

* fs: add uv_fs_realpath() (Yuval Brik)

* win: fix path for removed and renamed fs events (Joran Dirk Greef)

* win: do not read more from stream than available (Jeremy Whitlock)

* test: test that uv_close() doesn't corrupt QUEUE (Andrey Mazo)

* unix: fix uv_fs_event_stop() from fs_event_cb (Andrey Mazo)

* test: fix self-deadlocks in thread_rwlock_trylock (Ben Noordhuis)

* src: remove non ascii character (sztomi)

* test: fix test udp_multicast_join6 for AIX (Imran Iqbal)
2015-12-14 20:54:30 +01:00
Yuval Brik
e76b8838e5 fs: add uv_fs_realpath()
Equivalent to realpath(3), returns the full resolved absolute path of a
file or directory.

PR-URL: https://github.com/libuv/libuv/pull/531
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-12-05 11:32:58 +01:00
Saúl Ibarra Corretgé
f41b7386de include: add stdio.h to uv.h
Fixes a compilation problem in some platforms (notably OSX) after
6490c50.

PR-URL: https://github.com/libuv/libuv/pull/618
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremy Whitlock <jwhitlock@apache.org>
2015-11-17 09:14:01 +01:00
Petka Antonov
6490c508a9 misc: expose handle print APIs
PR-URL: https://github.com/libuv/libuv/pull/291
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-11-16 09:34:34 +01:00
Jianghua Yang
e5c03aed6b include: remove duplicate extern declaration
PR-URL: https://github.com/libuv/libuv/pull/547
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-09-24 23:19:31 +02:00
Saúl Ibarra Corretgé
455c4035d4 Now working on version 1.7.6 2015-09-22 22:27:51 +02:00
Saúl Ibarra Corretgé
a8c1136de2 2015.09.23, Version 1.7.5 (Stable)
Changes since version 1.7.4:

* unix: Support atomic compare & swap xlC on AIX (nmushell)

* unix: Fix including uv-aix.h on AIX (nmushell)

* unix: consolidate rwlock tryrdlock trywrlock errors (Saúl Ibarra
  Corretgé)

* unix, win: consolidate mutex trylock errors (Saúl Ibarra Corretgé)

* darwin: fix memory leak in uv_cpu_info (Jianghua Yang)

* test: add tests for the uv_rwlock implementation (Bert Belder)

* win: redo/fix the uv_rwlock APIs (Bert Belder)

* win: don't fetch function pointers to SRWLock APIs (Bert Belder)
2015-09-22 22:12:07 +02:00
Bert Belder
9a4fd2689d win: redo/fix the uv_rwlock APIs
Previously, on Windows Vista and later, we'd use the Windows native
SRWLock APIs. However they turned out to be semantically incompatible
with pthread read-write locks and/or plain buggy. This patch makes sure
that the custom implementation that was previously only used on old
Windows versions is now used everywhere.

This patch fixes a number of issues with the old fallback
implementation. Specifically:

* The reader count would not be incremented when a thread successfully
  acquired a read lock while another thread *also* held a read lock.

* `uv_rwlock_tryrdlock()` and `uv_rwlock_trywrlock()` now
  consistently return UV_EBUSY when a lock couldn't be acquired.

* Any unexpected errors now cause libuv to abort, with the exception of
  `uv_rwlock_init()`.

See also https://github.com/libuv/libuv/issues/515.

PR-URL: https://github.com/libuv/libuv/pull/525
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-09-22 11:18:13 -04:00
Saúl Ibarra Corretgé
e2db9240db Working on the next version 2015-09-11 17:58:25 +02:00
Saúl Ibarra Corretgé
a7ad4f5218 2015.09.12, Version 1.7.4 (Stable)
Changes since version 1.7.3:

* doc: uv_read_start and uv_read_cb clarifications (Ben Trask)

* freebsd: obtain true uptime through clock_gettime() (Jianghua Yang)

* win, tty: do not convert \r to \r\n (Colin Snover)

* build,gyp: add DragonFly to the list of OSes (Michael Neumann)

* fs: fix bug in sendfile for DragonFly (Michael Neumann)

* doc: add uv_dlsym() return type (Brian White)

* tests: fix fs tests run w/o full getdents support (Jeremy Whitlock)

* doc: fix typo (Devchandra Meetei Leishangthem)

* doc: fix uv-unix.h location (Sakthipriyan Vairamani)

* unix: fix error check when closing process pipe fd (Ben Noordhuis)

* test,freebsd: fix ipc_listen_xx_write tests (Santiago Gimeno)

* win: fix unsavory rwlock fallback implementation (Bert Belder)

* doc: clarify repeat timer behavior (Eli Skeggs)
2015-09-11 17:44:02 +02:00
Bert Belder
3eb6764acd win: fix unsavory rwlock fallback implementation
Before this patch an uv_mutex_t (backed by a critical section) could be
released by a tread different from the thread that acquired it, which is
not allowed. This is fixed by using a semaphore instead.

Note that the affected code paths were used on Windows XP and Windows
Server 2003 only.

Fixes: https://github.com/libuv/libuv/issues/515
PR-URL: https://github.com/libuv/libuv/pull/516
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-09-11 06:05:32 +02:00
Saúl Ibarra Corretgé
93877b11c8 2015.08.28, Version 1.7.3 (Stable)
Changes since version 1.7.2:

* threadpool: fix thread starvation bug (Ben Noordhuis)
2015-08-27 23:42:36 +02:00
Saúl Ibarra Corretgé
4d13a013fc 2015.08.25, Version 1.7.2 (Stable)
Changes since version 1.7.1:

* unix, win: make uv_loop_init return on error (Willem Thiart)

* win: reset pipe handle for pipe servers (Saúl Ibarra Corretgé)

* win: fix replacing pipe handle for pipe servers (Saúl Ibarra Corretgé)

* win: fix setting pipe pending instances after bind (Saúl Ibarra
  Corretgé)
2015-08-24 23:26:27 +02:00
Saúl Ibarra Corretgé
44f4b6bd82 2015.08.20, Version 1.7.1 (Stable)
Changes since version 1.7.0:

* doc: document the procedure for verifying releases (Saúl Ibarra
  Corretgé)

* doc: add note about Windows binaries to the README (Saúl Ibarra
  Corretgé)

* doc: use long GPG IDs in MAINTAINERS.md (Saúl Ibarra Corretgé)

* Revert "stream: squelch ECONNRESET error if already closed" (Saúl
  Ibarra Corretgé)

* doc: clarify uv_read_stop() is idempotent (Corbin Simpson)

* unix: OpenBSD's setsockopt needs an unsigned char for multicast
  (Zachary Hamm)

* test: Fix two memory leaks (Karl Skomski)

* unix,win: return EINVAL on nullptr args in uv_fs_{read,write} (Karl
  Skomski)

* win: set accepted TCP sockets as non-inheritable (Saúl Ibarra
  Corretgé)

* unix: remove superfluous parentheses in fs macros (Ben Noordhuis)

* unix: don't copy arguments for sync fs requests (Ben Noordhuis)

* test: plug small memory leak in unix test runner (Ben Noordhuis)

* unix,windows: allow NULL loop for sync fs requests (Ben Noordhuis)

* unix,windows: don't assert on unknown error code (Ben Noordhuis)

* stream: retry write on EPROTOTYPE on OSX (Brian White)

* common: fix use of snprintf on Windows (Saúl Ibarra Corretgé)

* tests: refactored fs watch_dir tests for stability (Jeremy Whitlock)
2015-08-19 22:45:07 +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
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
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
Bert Belder
b6bf6d2d1f win,stream: add slot to remember CRT fd
Certain types of streams may be opened from a CRT file descriptor (as
opposed to a Windows HANDLE). In order to close the file descriptor
later, libuv must store the file descriptor used to open the stream.

PR-URL: https://github.com/libuv/libuv/pull/396
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-06-14 16:22:17 -07:00
Saúl Ibarra Corretgé
30c8be07bb 2015.06.06, Version 1.6.1 (Stable)
Changes since version 1.6.0:

* unix: handle invalid _SC_GETPW_R_SIZE_MAX values (cjihrig)
2015-06-05 19:45:58 +02:00
Saúl Ibarra Corretgé
adfccad764 2015.06.04, Version 1.6.0 (Stable)
Changes since version 1.5.0:

* aix: fix setsockopt for multicast options (Michael)

* unix: don't block for io if any io handle is primed (Saúl Ibarra
  Corretgé)

* windows: MSVC 2015 has snprintf() (Rui Abreu Ferreira)

* windows: Add VS2015 support to vcbuild.bat (Jason Williams)

* doc: fix typo in tcp.rst (Igor Soarez)

* linux: work around epoll bug in kernels < 2.6.37 (Ben Noordhuis)

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

* stream: fix `select()` race condition (Fedor Indutny)

* unix: prevent infinite loop in uv__run_pending (Saúl Ibarra Corretgé)

* unix: make sure UDP send callbacks are asynchronous (Saúl Ibarra
  Corretgé)

* test: fix `platform_output` netmask printing. (Andrew Paprocki)

* aix: add ahafs autoconf detection and README notes (Andrew Paprocki)

* core: add ability to customize memory allocator (Saúl Ibarra Corretgé)
2015-06-03 21:32:57 +02:00
Saúl Ibarra Corretgé
bddd6a8489 core: add ability to customize memory allocator
This patch is composed by the work done in
https://github.com/libuv/libuv/pull/231 and
https://github.com/libuv/libuv/pull/287 plus some changes by yours
truly.

Thanks @beevik and @mattsta for their work on this!

PR-URL: https://github.com/libuv/libuv/pull/368
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-02 12:05:20 +02:00
cjihrig
a62c2d5928 unix,win: add uv_os_homedir()
PR-URL: https://github.com/libuv/libuv/pull/350
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-05-21 17:31:35 +02:00
Saúl Ibarra Corretgé
4e77f74c7b 2015.05.07, Version 1.5.0 (Stable)
Changes since version 1.4.2:

* doc: clarify that the thread pool primites are not thread safe
  (Andrius Bentkus)

* aix: always deregister closing fds from epoll (Michael)

* unix: fix glibc-2.20+ macro incompatibility (Massimiliano Torromeo)

* doc: add Sphinx plugin for generating links to man pages (Saúl Ibarra
  Corretgé)

* doc: link system and library calls to man pages (Saúl Ibarra Corretgé)

* doc: document uv_getnameinfo_t.{host|service} (Saúl Ibarra Corretgé)

* build: update the location of gyp (Stephen von Takach)

* win: name all anonymous structs and unions (TomCrypto)

* linux: work around epoll bug in kernels 3.10-3.19 (Ben Noordhuis)

* darwin: fix size calculation in select() fallback (Ole André Vadla
  Ravnås)

* solaris: fix setsockopt for multicast options (Julien Gilli)

* test: fix race condition in multithreaded test (Ben Noordhuis)

* doc: fix long lines in tty.rst (Ben Noordhuis)

* test: use UV_TTY_MODE_* values in tty test (Ben Noordhuis)

* unix: don't clobber errno in uv_tty_reset_mode() (Ben Noordhuis)

* unix: reject non-tty fds in uv_tty_init() (Ben Noordhuis)

* win: fix pipe blocking writes (Alexis Campailla)

* build: fix cross-compiling for iOS (Steven Kabbes)

* win: remove unnecessary malloc.h

* include: use `extern "c++"` for defining C++ code (Kazuho Oku)

* unix: reap child on execvp() failure (Ryan Phillips)

* windows: fix handle leak on EMFILE (Brian Green)

* test: fix tty_file, close handle if initialized (Saúl Ibarra Corretgé)

* doc: clarify what uv_*_open accepts (Saúl Ibarra Corretgé)

* doc: clarify that we don't maintain external doc resources (Saúl
  Ibarra Corretgé)

* build: add documentation for ninja support (Devchandra Meetei
  Leishangthem)

* doc: document uv_buf_t members (Corey Farrell)

* linux: fix epoll_pwait() fallback on arm64 (Ben Noordhuis)

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

* unix: don't close the fds we just setup (Sam Roberts)

* test: spawn child replacing std{out,err} to stderr (Saúl Ibarra
  Corretgé)

* unix: fix swapping fds order in uv_spawn (Saúl Ibarra Corretgé)

* unix: fix potential bug if dup2 fails in uv_spawn (Saúl Ibarra
  Corretgé)

* test: remove LOG and LOGF variadic macros (Saúl Ibarra Corretgé)

* win: fix uv_fs_access on directories (Saúl Ibarra Corretgé)

* win: fix of double free in uv_uptime (Per Nilsson)

* unix: open "/dev/null" instead of "/" for emfile_fd (Alan Rogers)

* docs: add some missing words (Daryl Haresign)

* unix: clean up uv_fs_open() O_CLOEXEC logic (Ben Noordhuis)

* build: set SONAME for shared library in uv.gyp (Rui Abreu Ferreira)

* windows: define snprintf replacement as inline instead of static (Rui
  Abreu Ferreira)

* win: fix unlink of readonly files (João Reis)

* doc: fix uv_run(UV_RUN_DEFAULT) description (Ben Noordhuis)

* linux: intercept syscall when running under memory sanitizer (Keno
  Fischer)

* aix: fix uv_interface_addresses return value (farblue68)

* windows: defer reporting TCP write failure until next tick (Saúl
  Ibarra Corretgé)

* test: add test for deferred TCP write failure (Saúl Ibarra Corretgé)
2015-05-06 21:48:15 +02:00
Saúl Ibarra Corretgé
1f711e4d6d Revert "memory: add uv_replace_allocator"
This reverts commit c272f1f1bc.

The concept will come back to libuv, but it needs some more work.
2015-04-29 09:37:02 +02:00
Kazuho Oku
252f3624c2 include: use extern "c++" for defining C++ code
PR-URL: https://github.com/libuv/libuv/pull/265
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-03-18 09:40:51 +01:00
Brett Vickers
c272f1f1bc memory: add uv_replace_allocator
With uv_replace_allocator, it's possible to override the default
memory allocator's malloc and free calls with functions of the user's
choosing. This allows libuv to interoperate with projects requiring a
custom memory allocator.

Internally, all calls to malloc and free have been replaced with
uv__malloc and uv__free, respectively. The uv__malloc and uv__free
functions call malloc and free unless they have been overridden by a
previous call to uv_replace_allocator.

As part of this change, the special aligned memory allocations
performed in src/win/fs-event.c have been replaced with standard
allocations. The 4-byte alignment being requested in this file was
unnecessary, since standard allocators already guarantee at least an
8-byte alignment.

PR-URL: https://github.com/libuv/libuv/pull/231
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-03-05 20:02:16 +01:00
TomCrypto
073323baca win: name all anonymous structs and unions
All the public structs and unions in the private fields in uv-win.h have
been named and all code accessing them updated, to comply to the C89
spec (which were previously causing warnings with the -pedantic flag).

PR-URL: https://github.com/libuv/libuv/pull/239
Reviewed-By: Andrius Bentkus <andrius.bentkus@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-03-04 09:35:10 +01:00
Saúl Ibarra Corretgé
8ef34592a9 doc: document uv_getnameinfo_t.{host|service}
Fixes: https://github.com/libuv/libuv/issues/182
PR-URL: https://github.com/libuv/libuv/pull/233
Reviewed-By: Tim Caswell <tim@creationix.com>
2015-03-02 16:53:57 +01:00
Saúl Ibarra Corretgé
1a7391348a 2015.02.27, Version 1.4.2 (Stable)
Changes since version 1.4.1:

* stream: ignore EINVAL for SO_OOBINLINE on OS X (Fedor Indutny)
2015-02-26 11:20:00 +01:00
Saúl Ibarra Corretgé
e8e3fc5789 2015.02.25, Version 1.4.1 (Stable)
Changes since version 1.4.0:

* win: don't use inline keyword in thread.c (Ben Noordhuis)

* windows: fix setting dirent types on uv_fs_scandir_next (Saúl Ibarra
  Corretgé)

* unix,windows: make uv_thread_create() return errno (Ben Noordhuis)

* tty: fix build for SmartOS (Julien Gilli)

* unix: fix for uv_async data race (Michael Penick)

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

* stream: use SO_OOBINLINE on OS X (Fedor Indutny)
2015-02-24 20:45:46 +01:00
Ben Noordhuis
3f910a0196 unix, windows: map EHOSTDOWN errno
Fixes: https://github.com/libuv/libuv/issues/195
PR-URL: https://github.com/libuv/libuv/pull/212
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-02-19 15:38:12 +01:00
Saúl Ibarra Corretgé
3ddfb4a9cc windows: fix setting dirent types on uv_fs_scandir_next
Also make the tests more strict.

PR-URL: https://github.com/libuv/libuv/pull/201
Reviewed-By: Tim Caswell <tim@creationix.com>
Reviewed-By: Bert Belder <bertbelder@gmail.com>
2015-02-12 09:05:48 +01:00
Saúl Ibarra Corretgé
19fb8a9064 2015.02.10, Version 1.4.0 (Stable)
Changes since version 1.3.0:

* unix: check Android support for pthread_cond_timedwait_monotonic_np
  (Leith Bade)

* test: use modified path in test (cjihrig)

* unix: implement uv_stream_set_blocking() (Ben Noordhuis)
2015-02-09 21:06:37 +01:00
Saúl Ibarra Corretgé
165685b2a9 2015.01.29, Version 1.3.0 (Stable)
Changes since version 1.2.1:

* unix, windows: set non-block mode in uv_poll_init (Saúl Ibarra
  Corretgé)

* doc: clarify which flags are supported in uv_fs_event_start (Saúl
  Ibarra Corretgé)

* win,unix: move loop functions which have identical implementations
  (Andrius Bentkus)

* doc: explain how the threadpool is allocated (Alex Mo)

* doc: clarify uv_default_loop (Saúl Ibarra Corretgé)

* unix: fix implicit declaration compiler warning (Ben Noordhuis)

* unix: fix long line introduced in commit 94e628fa (Ben Noordhuis)

* unix, win: add synchronous uv_get{addr,name}info (Saúl Ibarra
  Corretgé)

* linux: fix epoll_pwait() regression with < 2.6.19 (Ben Noordhuis)

* build: compile -D_GNU_SOURCE on linux (Ben Noordhuis)

* build: use -fvisibility=hidden in autotools build (Ben Noordhuis)

* fs, pipe: no trailing terminator in exact sized buffers (Andrius
  Bentkus)

* style: rename buf to buffer and len to size for consistency (Andrius
  Bentkus)

* test: fix test-spawn on MinGW32 (Luis Martinez de Bartolome)

* win, pipe: fix assertion when destroying timer (Andrius Bentkus)

* win, unix: add pipe_peername implementation (Andrius Bentkus)
2015-01-28 21:54:27 +01:00
Andrius Bentkus
39a0936fec win, unix: add pipe_peername implementation
PR-URL: https://github.com/libuv/libuv/pull/166
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-01-28 21:40:32 +01:00
Andrius Bentkus
2bfa2e5e22 style: rename buf to buffer and len to size for consistency
PR-URL: https://github.com/libuv/libuv/pull/159
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2015-01-27 11:31:16 +01:00
Saúl Ibarra Corretgé
f2bb8d394c unix, win: add synchronous uv_get{addr,name}info
PR-URL: https://github.com/libuv/libuv/pull/156
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Bert Belder <bertbelder@gmail.com>
2015-01-23 01:12:05 +01:00
Saúl Ibarra Corretgé
4ca78e9890 2015.01.15, Version 1.2.1 (Stable)
Changes since version 1.2.0:

* unix: remove unused dtrace file (Saúl Ibarra Corretgé)

* test: skip TTY select test if /dev/tty can't be opened (Saúl Ibarra
  Corretgé)

* doc: clarify the behavior of uv_tty_init (Saúl Ibarra Corretgé)

* doc: clarify how uv_async_send behaves (Saúl Ibarra Corretgé)

* build: make dist now generates a full tarball (Johan Bergström)

* freebsd: make uv_exepath more resilient (Saúl Ibarra Corretgé)

* unix: make setting the tty mode to the same value a no-op (Saúl Ibarra
  Corretgé)

* win,tcp: support uv_try_write (Bert Belder)

* test: enable test-tcp-try-write on windows (Bert Belder)

* win,tty: support uv_try_write (Bert Belder)

* unix: set non-block mode in uv_{pipe,tcp,udp}_open (Ben Noordhuis)
2015-01-14 19:52:26 +01:00
Saúl Ibarra Corretgé
09f25b13cd 2015.01.06, Version 1.2.0 (Stable)
Changes since version 1.1.0:

* linux: fix epoll_pwait() sigmask size calculation (Ben Noordhuis)

* tty: implement binary I/O terminal mode (Yuri D'Elia)

* test: fix spawn test with autotools build (Ben Noordhuis)

* test: skip ipv6 tests when ipv6 is not supported (Ben Noordhuis)

* common: move STATIC_ASSERT to uv-common.h (Alexey Melnichuk)

* win/thread: store thread handle in a TLS slot (Alexey Melnichuk)

* unix: fix ttl, multicast ttl and loop options on IPv6 (Saúl Ibarra
  Corretgé)

* linux: fix support for preadv/pwritev-less kernels (Ben Noordhuis)

* unix: make uv_exepath(size=0) return UV_EINVAL (Ben Noordhuis)

* darwin: fix uv_exepath(smallbuf) UV_EPERM error (Ben Noordhuis)

* openbsd: fix uv_exepath(smallbuf) UV_EINVAL error (Ben Noordhuis)

* linux: fix uv_exepath(size=1) UV_EINVAL error (Ben Noordhuis)

* sunos: preemptively fix uv_exepath(size=1) (Ben Noordhuis)

* win: fix and clarify comments in winapi.h (Bert Belder)

* win: make available NtQueryDirectoryFile (Bert Belder)

* win: add definitions for directory information types (Bert Belder)

* win: use NtQueryDirectoryFile to implement uv_fs_scandir (Bert Belder)

* unix: don't unlink unix socket on bind error (Ben Noordhuis)

* build: fix bad comment in autogen.sh (Ben Noordhuis)

* build: add AC_PROG_LIBTOOL to configure.ac (Ben Noordhuis)

* test: skip udp_options6 if there no IPv6 support (Saúl Ibarra
  Corretgé)

* win: add definitions for MUI errors mingw lacks (Bert Belder)

* build: enable warnings in autotools build (Ben Noordhuis)

* build: remove -Wno-dollar-in-identifier-extension (Ben Noordhuis)

* build: move flags from Makefile.am to configure.ac (Ben Noordhuis)
2015-01-05 20:28:35 +01:00
Yuri D'Elia
025602da13 tty: implement binary I/O terminal mode
Introduce a uv_tty_mode_t enum for uv_tty_set_mode(), with backward
compatible values.  Add a new mode UV_TTY_MODE_IO, which uses
cfmakeraw() internally.

PR-URL: https://github.com/libuv/libuv/pull/86
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2014-12-27 18:18:24 +01:00
Saúl Ibarra Corretgé
a6d3d5a0f5 2014.12.25, Version 1.1.0 (Stable)
Changes since version 1.0.2:

* test: test that closing a poll handle doesn't corrupt the stack (Bert
  Belder)

* win: fix compilation of tests (Marc Schlaich)

* Revert "win: keep a reference to AFD_POLL_INFO in cancel poll" (Bert
  Belder)

* win: avoid stack corruption when closing a poll handle (Bert Belder)

* test: fix test-fs-file-loop on Windows (Bert Belder)

* test: fix test-cwd-and-chdir (Bert Belder)

* doc: indicate what version uv_loop_configure was added on (Saúl Ibarra
  Corretgé)

* doc: fix sphinx warning (Saúl Ibarra Corretgé)

* test: skip spawn_setuid_setgid if we get EACCES (Saúl Ibarra Corretgé)

* test: silence some Clang warnings (Saúl Ibarra Corretgé)

* test: relax osx_select_many_fds (Saúl Ibarra Corretgé)

* test: fix compilation warnings when building with Clang (Saúl Ibarra
  Corretgé)

* win: fix autotools build of tests (Luis Lavena)

* gitignore: ignore Visual Studio files (Marc Schlaich)

* win: set fallback message if FormatMessage fails (Marc Schlaich)

* win: fall back to default language in uv_dlerror (Marc Schlaich)

* test: improve compatibility for dlerror test (Marc Schlaich)

* test: check dlerror is "no error" in no error case (Marc Schlaich)

* unix: change uv_cwd not to return a trailing slash (Saúl Ibarra
  Corretgé)

* test: fix cwd_and_chdir test on Unix (Saúl Ibarra Corretgé)

* test: add uv_cwd output to platform_output test (Saúl Ibarra Corretgé)

* build: fix dragonflybsd autotools build (John Marino)

* win: scandir use 'ls' for formatting long strings (Kenneth Perry)

* build: remove clang and gcc_version gyp defines (Ben Noordhuis)

* unix, windows: don't treat uv_run_mode as a bitmask (Saúl Ibarra
  Corretgé)

* unix, windows: fix UV_RUN_ONCE mode if progress was made (Saúl Ibarra
  Corretgé)
2014-12-24 09:03:51 +01:00