1
0
mirror of https://github.com/libuv/libuv synced 2025-03-28 21:13:16 +00:00

927 Commits

Author SHA1 Message Date
cjihrig
fa8b4f27c0
Now working on version 1.39.1
Fixes: https://github.com/libuv/libuv/issues/2943
2020-08-24 20:27:18 -04:00
cjihrig
25f4b8b8a3
2020.08.26, Version 1.39.0 (Stable)
Changes since version 1.38.1:

* unix: use relaxed loads/stores for clock id (Ben Noordhuis)

* build,win: link to user32.lib and advapi32.lib (George Zhao)

* unix: squelch harmless valgrind warning (ssrlive)

* include: fx c++ style comments warnings (Turbinya)

* build,cmake: Change installation location on MinGW (erw7)

* linux: use copy_file_range for uv_fs_copyfile when possible (Carter
  Li)

* win,tcp: avoid reinserting a pending request (

* docs: improve the descriptions for get memory info (Juan Sebastian
  velez Posada)

* test: add udp-mmsg test (Ryan Liptak)

* udp: add uv_udp_using_recvmmsg query (Ryan Liptak)

* doc: add more error constants (TK-one)

* zos: fix potential event loop stall (Trevor Norris)

* include: add internal fields struct to uv_loop_t (Trevor Norris)

* core: add API to measure event loop idle time (Trevor Norris)

* win,fs: use CreateDirectoryW instead of _wmkdir (Mustafa M)

* win,nfc: fix integer comparison signedness (escherstair)

* win,nfc: use

* win,nfc: removed some unused variables (escherstair)

* win,nfc: add missing return statement (escherstair)

* win,nfc: disable clang-format for

* darwin: use IOKit for uv_cpu_info (Evan Lucas)

* test: fix thread race in process_title_threadsafe (Ben Noordhuis)

* win,fs: avoid implicit access to _doserrno (Jameson Nash)

* test: give hrtime test a custom 20s timeout (Jameson Nash)

* build: add more failed test, for qemu version bump (gengjiawen)

* unix: handle src, dest same in uv_fs_copyfile() (cjihrig)

* unix: error when uv_setup_args() is not called (Ryan Liptak)

* aix: protect uv_exepath() from uv_set_process_title() (Richard Lau)

* fs: clobber req->path on uv_fs_mkstemp() error (tjarlama)

* cmake: fix compile error C2001 on Chinese Windows (司徒玟琅)

* test: avoid double evaluation in ASSERT_BASE macro (tjarlama)

* tcp: fail instantly if local port is unbound (Bartosz Sosnowski)

* doc: fix most sphinx warnings (Jameson Nash)

* nfci: address some style nits (Jameson Nash)

* unix: don't use _POSIX_PATH_MAX (Ben Noordhuis)
2020-08-24 20:25:03 -04:00
Trevor Norris
e8effd4556 core: add API to measure event loop idle time
The API addition `uv_metrics_idle_time()` is a thread safe call that
allows the user to retrieve the amount of time the event loop has spent
in the kernel's event provider (i.e. poll). It was done this way to
allow retrieving this value without needing to interrupt the execution
of the event loop. This option can be enabled by passing
`UV_METRICS_IDLE_TIME` to `uv_loop_configure()`.

One important aspect of this change is, when enabled, to always first
call the event provider with a `timeout == 0`. This allows libuv to know
whether any events were waiting in the event queue when the event
provider was called. The importance of this is because libuv is tracking
the amount of "idle time", not "poll time". Thus the provider entry time
is not recorded when `timeout == 0` (the event provider never idles in
this case).

While this does add a small amount of overhead, when enabled, but the
overhead decreases when the event loop has a heavier load. This is
because poll events will be waiting when the event provider is called.
Thus never actually recording the provider entry time.

Checking if `uv_loop_t` is configured with `UV_METRICS_IDLE_TIME` always
happens in `uv__metrics_set_provider_entry_time()` and
`uv__metrics_update_idle_time()`. Making the conditional logic wrapping
each call simpler and allows for instrumentation to always hook into
those two function calls.

Rather than placing the fields directly on `uv__loop_internal_fields_t`
add the struct `uv__loop_metrics_t` as a location for future metrics API
additions.

Tests and additional documentation has been included.

PR-URL: https://github.com/libuv/libuv/pull/2725
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Jameson Nash <vtjnash@gmail.com>
2020-08-04 10:31:42 -04:00
Trevor Norris
70bbc093f1 include: add internal fields struct to uv_loop_t
Add struct `uv__loop_internal_fields_t` as a location for future
additions to `uv_loop_t` while also maintaining v1.x compatibility.

Currently `uv__loop_internal_fields_t` only contains the `flags` field.
The reason for adding the `flags` field is because the same field was
never added to `UV_LOOP_PRIVATE_FIELDS` in Windows as it was in Unix.

The idea for creating a struct and attaching it to `uv_loop_t` for
future API enhancements was taken from a comment by bnoordhuis in:
https://github.com/libuv/libuv/issues/2506#issuecomment-540050665

Also add `internal_fields` to `uv_loop_t` to store the pointer to
`uv__loop_internal_fields_t`. This naming makes more sense than just
using `active_reqs.unused[1]`. To maintain ABI compatibility, shrink the
`unused` array.

PR-URL: https://github.com/libuv/libuv/pull/2725
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Jameson Nash <vtjnash@gmail.com>
2020-08-04 10:31:18 -04:00
Ryan Liptak
6b5aa669db
udp: add uv_udp_using_recvmmsg query
Allows for determining if a buffer large enough for multiple dgrams
should be allocated in alloc_cb of uv_udp_recvstart, for example.
Contributes towards #2822.

PR-URL: https://github.com/libuv/libuv/pull/2830
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jameson Nash <vtjnash@gmail.com>
2020-07-28 23:28:18 -04:00
Turbinya
e0cb4f06c9 include: fx c++ style comments warnings
PR-URL: https://github.com/libuv/libuv/pull/2890
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2020-07-20 11:49:19 +02:00
cjihrig
032f2b1251
Now working on version 1.38.2
Fixes: https://github.com/libuv/libuv/issues/2898
2020-07-03 12:53:03 -04:00
cjihrig
e8b989ea1f
2020.07.04, Version 1.38.1 (Stable)
Changes since version 1.38.0:

* test: use last matching qemu version (cjihrig)

* win, util: rearrange uv_hrtime (Bartosz Sosnowski)

* test: skip signal_multiple_loops test on QEMU (gengjiawen)

* build: add android build to CI (gengjiawen)

* test: extend fs_event_error_reporting timeout (cjihrig)

* build: link libkvm on netbsd only (Alexander Tokmakov)

* linux: refactor /proc file reader logic (Ben Noordhuis)

* linux: read load average from /proc/loadavg (Ben Noordhuis)

* android: remove patch code for below 21 (gengjiawen)

* win: fix visual studio 2008 build (Arenoros)

* win,tty: fix deadlock caused by inconsistent state (lander0s)

* unix: use relaxed loads/stores for feature checks (Ben Noordhuis)

* build: don't .gitignore m4/ax_pthread.m4 (Ben Noordhuis)

* unix: fix gcc atomics feature check (Ben Noordhuis)

* darwin: work around clock jumping back in time (Ben Noordhuis)

* udp: fix write_queue cleanup on sendmmsg error (Santiago Gimeno)

* src: build fix for Android (David Carlier)
2020-07-03 12:51:27 -04:00
cjihrig
cc51217a31
Now working on version 1.38.1
Fixes: https://github.com/libuv/libuv/issues/2844
2020-05-17 11:36:52 -04:00
cjihrig
1ab9ea3790
2020.05.18, Version 1.38.0 (Stable)
Changes since version 1.37.0:

* test: skip poll_duplex and poll_unidirectional on PASE (Xu Meng)

* linux: make cpu_times consistently be milliseconds (James Ross)

* win: DRY uv_poll_start() and uv_poll_stop() (Ben Noordhuis)

* win: DRY uv_poll_close() (Ben Noordhuis)

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

* unix: yield cpu when spinlocking on async handle (Ben Noordhuis)

* win: remove dep on GetQueuedCompletionStatusEx (Colin Finck)

* doc: correct source lines (Shohei YOSHIDA)

* build,android: fix typo (twosee)

* doc: uv_cancel() handles uv_random_t requests (Philip Chimento)

* doc: fix unescaped character (Philip Chimento)

* build,cmake: fix compilation on old MinGW (erw7)

* build: remove unnessesary MSVC warnings (Bartosz Sosnowski)

* win: make uv_udp_init_ex() accept UV_UDP_RECVMMSG (Ben Noordhuis)

* unix: simplify uv__udp_init_ex() (Ben Noordhuis)

* win: remove MAX_PATH limitations (Bartosz Sosnowski)

* build, win: add long path aware manifest (Bartosz Sosnowski)

* doc: check/idle/prepare functions always succeed (Ben Noordhuis)

* darwin: fix build with non-apple compilers (Ben Noordhuis)

* win: support environment variables > 32767 chars (Ben Noordhuis)

* unix: fully initialize struct msghdr (Ben Noordhuis)

* doc: add uv_replace_allocator thread safety warning (twosee)

* unix: fix int overflow when copying large files (Michal Artazov)

* fs: report original error (Bartosz Sosnowski)

* win, fs: add IO_REPARSE_TAG_APPEXECLINK support (Bartosz Sosnowski)

* doc: fix formatting (Ben Noordhuis)

* unix: fix memory leak when uv_loop_init() fails (Anna Henningsen)

* unix: shrink uv_udp_set_source_membership() stack (Ben Noordhuis)

* unix,win: fix wrong sizeof argument to memcpy() (Ben Noordhuis)

* build: check for libraries not provided by libc (Jeroen Roovers)

* doc: fix the order of arguments to calloc() (MasterDuke17)

* unix: don't abort when getrlimit() fails (Ben Noordhuis)

* test: support common user profile on IBMi (Xu Meng)

* build: test on more platforms via QEMU in CI (gengjiawen)
2020-05-17 11:34:37 -04:00
Bartosz Sosnowski
457285827c fs: report original error
Exposes the original system error of the filesystem syscalls. Adds a new
uv_fs_get_system_error which returns orignal errno on Linux or
GetLastError on Windows.

Ref: https://github.com/libuv/libuv/issues/2348

PR-URL: https://github.com/libuv/libuv/pull/2810
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2020-04-29 13:14:57 +02:00
Ben Noordhuis
72fe3543fe unix,win: add uv_library_shutdown()
Make it possible to explicitly tell libuv to release any resources
it's still holding onto (memory, threads, file descriptors, etc.)

Before this commit, cleanup was performed in various destructors.
This commit centralizes the cleanup logic, enabling the addition of
`uv_library_shutdown()`, but maintains the current observable behavior
of cleaning up when libuv is unloaded by means of `dlclose(3)`.

Fixes: https://github.com/libuv/libuv/issues/2763
PR-URL: https://github.com/libuv/libuv/pull/2764
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2020-04-22 12:24:36 +02:00
James Ross
37a8affbd3 linux: make cpu_times consistently be milliseconds
On Linux, cpu_times have been calculated differently to all other
platforms for a while. Other platforms (FreeBSD, Mac, Windows) are all
in milliseconds, but Linux has been returning values ten times larger.

libuv has not previously documented what unit cpu_times uses, even
though NodeJS did - as milliseconds.

Here we're both documenting that the cpu_times are indeed in
milliseconds, and fixing the inconsistency on Linux.

Fixes: https://github.com/libuv/libuv/issues/2773
PR-URL: https://github.com/libuv/libuv/pull/2796
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2020-04-22 10:46:07 +02:00
cjihrig
0e00e14003
Now working on version 1.37.1
Fixes: https://github.com/libuv/libuv/issues/2801
2020-04-19 12:17:40 -04:00
cjihrig
02a9e1be25
2020.04.20, Version 1.37.0 (Stable)
Changes since version 1.36.0:

* timer: remove redundant check in heap compare (Yash Ladha)

* udp: add flag to enable recvmmsg(2) explicitly (Saúl Ibarra Corretgé)
2020-04-19 12:15:57 -04:00
Saúl Ibarra Corretgé
5736658bee
udp: add flag to enable recvmmsg(2) explicitly
Instead of implicitly enabling it by checking the supplied buffer size
to alloc_cb, have a dedicated flag that must be set on `uv_udp_init_ex`.

Fixes: https://github.com/libuv/libuv/issues/2791
Closes: https://github.com/libuv/libuv/pull/2792
PR-URL: https://github.com/libuv/libuv/pull/2799
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2020-04-19 11:40:24 -04:00
cjihrig
80c18ffaf5
Now working on version 1.36.1
Fixes: https://github.com/libuv/libuv/issues/2787
2020-04-15 12:33:35 -04:00
cjihrig
533b738838
2020.04.16, Version 1.36.0 (Stable)
Changes since version 1.35.0:

* build: add aix-common.c for AIX cmake build (Jesse Gorzinski)

* zos: explicitly mark message queue events (Irek Fakhrutdinov)

* zos: move mq check out of loop to save cpu cycles (Irek Fakhrutdinov)

* zos: add checks to ensure behavior of epoll_wait (Irek Fakhrutdinov)

* src: add uv__reallocf() (Ben Noordhuis)

* build: ibmi support for cmake (Jesse Gorzinski)

* build: fix gyp build for Android API >= 28 (Lin Zhang)

* udp: return recvmmsg-ed datagrams in order (Saúl Ibarra Corretgé)

* zos,test: fix spawn_empty_env for shared library build (Richard Lau)

* zos: fix non-Release builds (Richard Lau)

* zos: fix return value on expired nanosleep() call (Richard Lau)

* build: fix z/OS cmake build (Richard Lau)

* test: add a bunch of ASSERT macros (Santiago Gimeno)

* test: remove unused extern declaration (Ben Noordhuis)

* test: canonicalize argv[0] in exepath test (Ben Noordhuis)

* test: simplify platform_init() (Ben Noordhuis)

* ibmi: Fix isatty EBADF handling and refactor (Kevin Adler)

* test: Test EBADF tty handling (Kevin Adler)

* build: make cmake build benchmarks (Ben Noordhuis)

* win: use RtlGenRandom from advapi32.dll directly (Ben Noordhuis)

* android: fix OOB write in uv_interface_addresses() (Lin Zhang)

* test: pass test when hostname is single character (毛毛)

* ibmi: set the highest process priority to -10 (Xu Meng)

* build: remove support for gyp (Ben Noordhuis)

* doc: add note to README on cross-compiling (Ben Noordhuis)

* fs: add uv_fs_lutime() (Sk Sajidul Kadir)

* unix: implement cpu_relax() for arm (David Carlier)

* linux: fix uv__accept4() (twosee)

* win: handle file paths in uv_fs_statfs() (erw7)

* unix: fix uv_os_environ() null pointer check (Rikard Falkeborn)

* win: fix uv_os_environ() null pointer check (Rikard Falkeborn)

* unix: fix compilation on macOS 32-bit architectures (Brad King)

* win: replace alloca() with stack-based array (Ben Noordhuis)
2020-04-15 12:31:21 -04:00
Sk Sajidul Kadir
bd4292385f fs: add uv_fs_lutime()
PR-URL: https://github.com/libuv/libuv/pull/2723
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2020-04-14 10:06:33 +02:00
Ben Noordhuis
53f3c687fc build: remove support for gyp
Upstream GYP has been unmaintained for some time now. The only big
downstream user is Node.js and they already maintain GYP build files
for their other dependencies.

This commit removes vcbuild.bat because:

1. it's entirely built around GYP, and
2. duplicates a lot of functionality that cmake provides out of the box

This commit also removes appveyor.yml. It hasn't been used after we
stopped providing prebuilt binaries for Windows about two years ago.

As if that isn't enough, this commit also removes the Android build
scripts. They were wrappers around GYP. Use CMake.

PR-URL: https://github.com/libuv/libuv/pull/2682
Refs: https://github.com/libuv/libuv/pull/2681
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2020-04-07 18:24:13 +02:00
Xu Meng
d21f5aeab0
ibmi: set the highest process priority to -10
On IBMi PASE, the highest process priority is -10.

PR-URL: https://github.com/libuv/libuv/pull/2642
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2020-04-06 09:22:24 -04:00
Saúl Ibarra Corretgé
d9cd7d437d udp: return recvmmsg-ed datagrams in order
When recvmmsg support was added it returned the datagrams in reverse
received order, which may impact some applications.

To restore the previous behavior, we call recv_cb one last time with
nread == 0 and addr == NULL so applications can free the buffer.

PR-URL: https://github.com/libuv/libuv/pull/2736
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2020-03-24 08:27:00 +01:00
cjihrig
584ba94885
Now working on version 1.35.1
Fixes: https://github.com/libuv/libuv/issues/2709
2020-03-11 12:25:36 -04:00
cjihrig
e45f1ec38d
2020.03.12, Version 1.35.0 (Stable)
Changes since version 1.34.2:

* src: android build fix (David Carlier)

* build: make code compilable for iOS on Xcode (ssrlive)

* ibmi: skip unsupported fs test cases (Xu Meng)

* ibmi: ensure that pipe backlog is not zero (Xu Meng)

* test,udp6: fix udp_ipv6 test flakiness (Jameson Nash)

* test: fix fs_event_watch_dir_recursive flakiness (Santiago Gimeno)

* pipe: disallow listening on an IPC pipe (Witold Kręcicki)

* build,cmake: improve buil experience (Isabella Muerte)

* unix: remove support for FreeBSD < 10 (Saúl Ibarra Corretgé)

* linux: simplify uv__accept() (Ben Noordhuis)

* linux: assume presence of SOCK_CLOEXEC flag (Ben Noordhuis)

* linux: simplify uv__dup2_cloexec() (Ben Noordhuis)

* freebsd,linux: simplify uv__make_socketpair() (Ben Noordhuis)

* unix: fix error handling in uv__make_socketpair() (Ben Noordhuis)

* freebsd,linux: simplify uv__make_pipe() (Ben Noordhuis)

* unix: fix error handling in uv__make_pipe() (Ben Noordhuis)

* linux: simplify uv__async_eventfd() (Ben Noordhuis)

* linux: assume the presence of inotify system calls (Ben Noordhuis)

* doc: strip ICC profile from 2 jpg files (Dominique Dumont)

* unix: make uv_tcp_keepalive predictable (Manuel BACHMANN)

* docs: uv_setup_args() may take ownership of argv (Ben Noordhuis)

* unix: fix error path in uv_setup_args() (Ben Noordhuis)

* unix: fix size check in uv_get_process_title() (Ben Noordhuis)

* doc: add erw7 to maintainers (erw7)

* test: fixed udp4_echo_server implementation (Marek Vavrusa)

* test: added udp ping benchmark (1,10,100 pingers) (Marek Vavrusa)

* freebsd,linux: add recvmmsg() + sendmmsg() udp implementation (Marek
  Vavrusa)

* win,pipe: DRY/simplify some code paths (Jameson Nash)

* win: address some style nits (Jameson Nash)

* win,pipe: ensure `req->event_handle` is defined (Elliot Saba)

* win,pipe: consolidate overlapped initialization (Elliot Saba)

* win,pipe: erase event_handle after deleting pointer (Jameson Nash)

* build: fix android cmake build, build missing file (Ben Noordhuis)

* test: skip some UDP tests on IBMi (Xu Meng)

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

* src: fix wrong method name in comment (TK-one)

* test: add UV_TIMEOUT_MULTIPLIER environment var (Ben Noordhuis)

* unix: fix uv_cpu_info always returning UV_ENOTDIR on OpenBSD (Ben
  Davies)

* test: skip the pwd_shell test on IBMi (Xu Meng)

* win,tty: Change to restore cursor shape with uv_tty_reset() (erw7)

* win,tty: Added set cursor style to CSI sequences (erw7)

* test: handle EINTR, fix EOF check in poll test (Ben Noordhuis)

* unix: use socklen_t instead of size_t (Ben Noordhuis)

* doc: fix header file location (TK-one)

* unix: fix signal handle closing deferral (Ben Noordhuis)

* ibmi: set the amount of memory in use to zero (Xu Meng)

* zos: return on realloc failure in scandir() (Milad Farazmand)

* zos: fix scandir() error path NULL pointer deref (Ben Noordhuis)
2020-03-11 12:23:27 -04:00
erw7
288a06727b win,tty: Added set cursor style to CSI sequences
PR-URL: https://github.com/libuv/libuv/pull/1884
Refs: https://github.com/libuv/libuv/issues/1874
Co-authored-by: Bert Belder <bertbelder@gmail.com>
Co-authored-by: Jameson Nash <vtjnash@gmail.com>
Reviewed-By: Jameson Nash <vtjnash@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <s@saghul.net>
2020-02-29 14:11:36 +09:00
Marek Vavrusa
3d7136639a freebsd,linux: add recvmmsg() + sendmmsg() udp implementation
This commits adds support for recvmmsg() and sendmmsg() extensions to
recvmsg() and sendmsg() that allows the caller to receive and send
multiple message from a socket using a single system call. This has
performance benefits for some applications.

Co-authored-by: Ondřej Surý <ondrej@sury.org>
Co-authored-by: Witold Kręcicki <wpk@culm.net>

PR-URL: https://github.com/libuv/libuv/pull/2532
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <s@saghul.net>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2020-02-20 11:52:54 +01:00
cjihrig
3ac654c8a2
Now working on version 1.34.3
Fixes: https://github.com/libuv/libuv/issues/2646
2020-01-23 09:22:55 -05:00
cjihrig
f868c9ab0c
2020.01.24, Version 1.34.2 (Stable)
Changes since version 1.34.1:

* misc: adjust stalebot deadlines (Jameson Nash)

* test: fix env-vars flakiness (cjihrig)

* test: avoid truncating output lines (Jameson Nash)

* darwin: stop calling SetApplicationIsDaemon() (Ben Noordhuis)

* ibmi: implement uv_interface_addresses() (Xu Meng)

* osx,fsevent: fix race during uv_loop_close (Jameson Nash)

* osx,fsevent: clear pointer when deleting it [NFCI] (Jameson Nash)

* Revert "aix: replace ECONNRESET with EOF if already closed" (Jameson
  Nash)

* unix: handle uv__open_cloexec return value correctly (Anna Henningsen)
2020-01-23 09:20:02 -05:00
cjihrig
33cb9f4a3f
Now working on version 1.34.2
Fixes: https://github.com/libuv/libuv/issues/2595
2020-01-12 18:35:34 -05:00
cjihrig
8aa5636ec7
2020.01.13, Version 1.34.1 (Stable)
Changes since version 1.34.0:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* test: fix pthread memory leak (Trevor Norris)

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

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

* docs: fix formatting (Jameson Nash)

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

* docs: fix linkcheck (Jameson Nash)

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

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

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

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

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

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

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

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

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

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

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

* unix: refactor uv__fs_copyfile() logic (cjihrig)

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

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

* build: fix android autotools build (Ben Noordhuis)

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

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

* doc: add richardlau to maintainers (Richard Lau)

* aix: fix netmask for IPv6 (Richard Lau)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* fsevents: regression in watching / (Jameson Nash)

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

* build: fix build warning on cygwin (MaYuming)

* unix: set sin_len and sin6_len (Ouyang Yadong)

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

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

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

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

* android: fix build (David Carlier)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* win: map ERROR_ENVVAR_NOT_FOUND to UV_ENOENT (cjihrig)

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

* win: support retrieving empty env variables (cjihrig)

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

* test: fix typo in DYLD_LIBRARY_PATH (Ben Noordhuis)

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

* openbsd: fix uv_cpu_info (Santiago Gimeno)

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

* tcp: add uv_tcp_close_reset method (Santiago Gimeno)

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

* test: remove assertion in fs_statfs test (cjihrig)

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

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

* timer: fix uv_timer_start on closing timer (seny)

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

* udp: fix error return values (Santiago Gimeno)

* udp: drop IPV6_SSM_SUPPORT macro (Santiago Gimeno)

* udp: fix uv__udp_set_source_membership6 (Santiago Gimeno)

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

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

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

* include: map EILSEQ error code (cjihrig)

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

* build: fix ios build error (MaYuming)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* win: add UV_FS_O_FILEMAP (João Reis)

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

* github: add root warning to template (cjihrig)

* win: misc fs cleanup (cjihrig)

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

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

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

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

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

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

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

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

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

* ibmi: use correct header files (Xu Meng)

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

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

* test: fix test runner on MinGW (Crunkle)

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

* win: fix uv_spawn() ENOMEM on empty env (Ben Noordhuis)
2019-08-09 10:57:12 -04:00