Commit Graph

4696 Commits

Author SHA1 Message Date
Elliot Saba
56fc3de48c win,pipe: ensure req->event_handle is defined
Previously, this field was being used uninitialized, leading to the
uv_write call returning failure. This only happens in the rare fallback
path where UV_HANDLE_EMULATE_IOCP is set, meaning that the OVERLAPPED
opened pipe already was associated with an IOCP.

Fixes: https://github.com/libuv/libuv/issues/629
PR-URL: https://github.com/libuv/libuv/pull/2620
Reviewed-By: Saúl Ibarra Corretgé <s@saghul.net>
2020-02-27 09:12:52 +01:00
Jameson Nash
a5da270f78 win: address some style nits
PR-URL: https://github.com/libuv/libuv/pull/2620
Reviewed-By: Saúl Ibarra Corretgé <s@saghul.net>
2020-02-27 09:12:46 +01:00
Jameson Nash
4fa5fb9f7f win,pipe: DRY/simplify some code paths
PR-URL: https://github.com/libuv/libuv/pull/2620
Reviewed-By: Saúl Ibarra Corretgé <s@saghul.net>
2020-02-27 09:12:09 +01: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
Marek Vavrusa
56598f3d10 test: added udp ping benchmark (1,10,100 pingers)
The UDP pummel benchmark does not model usual UDP servers well,
in UDP services like DNS, DHCP or NTP, there is usually just one
socket bound to the registered port and a large number of
requestors asking queries, this benchmark is simple 1 sender : 1 receiver thread
benchmark with multiple senders multiplexing on the event loop.

The test reports number of senders and attained rate of requests,
and is based on TCP benchmark-ping-pong.c.

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:18 +01:00
Marek Vavrusa
618533b7e3 test: fixed udp4_echo_server implementation
It was missing socket binding and the on_recv() callback was wrong.

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:51:16 +01:00
erw7
18ff13c71e doc: add erw7 to maintainers
PR-URL: https://github.com/libuv/libuv/pull/2662
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Jameson Nash <vtjnash@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2020-02-18 17:38:54 +09:00
Ben Noordhuis
7b28d36056 unix: fix size check in uv_get_process_title()
It was checking that the destination buffer was big enough to hold
the total capacity of the process title (the total storage of argv)
when instead it should be checking that it's big enough to hold
the _current_ process title, which is normally much shorter.

Fixes: https://github.com/libuv/libuv/issues/2666
PR-URL: https://github.com/libuv/libuv/pull/2668
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2020-02-08 12:28:34 +01:00
Ben Noordhuis
ea3a5318ab unix: fix error path in uv_setup_args()
Only update the `process_title` struct on success, otherwise it points
to memory libuv doesn't own. Notably, libuv only owns `argv[0]` _after_
copying the argv table.

PR-URL: https://github.com/libuv/libuv/pull/2668
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2020-02-08 12:28:34 +01:00
Ben Noordhuis
fb4c563132 docs: uv_setup_args() may take ownership of argv
PR-URL: https://github.com/libuv/libuv/pull/2668
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2020-02-08 12:28:34 +01:00
Manuel BACHMANN
21aff3b4c4
unix: make uv_tcp_keepalive predictable
Current UNIX systems define various defaults for
TCP_KEEPINTVL and TCP_KEEPCNT, which makes the time
between TCP_KEEPIDLE delay is reached and timeout
effectively occurs unpredictable (Linux: /proc/sys
/net/ipv4/tcp_keepalive_intvl;tcp_keepalive_probes).

Do the following: set TCP_KEEPINTVL to 1 second (same
as Win32 default) and TCP_KEEPCNT to 10 times (same
as Win32 hardcoded value).

Fixes: https://github.com/libuv/libuv/issues/2664
PR-URL: https://github.com/libuv/libuv/pull/2669
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2020-02-07 22:52:45 +01:00
Dominique Dumont
fb5a35ee91
doc: strip ICC profile from 2 jpg files
The embedded color profiles are proprietary data. Considering that
embedding a color profile in a image is not necessary when color
accuracy is not important, it's better to strip them.

This was done with:

convert -strip docs/src/static/diagrams.key/Data/st0-311.jpg \
  docs/src/static/diagrams.key/Data/st0-311.jpg
convert -strip docs/src/static/diagrams.key/Data/st1-475.jpg \
  docs/src/static/diagrams.key/Data/st1-475.jpg

convert command comes from ImageMagick project.

Fixes: https://github.com/libuv/libuv/issues/2670
PR-URL: https://github.com/libuv/libuv/pull/2672
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2020-02-07 22:08:04 +01:00
Ben Noordhuis
24d73d065f linux: assume the presence of inotify system calls
This lets us get rid of the system call wrappers and simplify
the fs event watcher code a great deal.

All system calls were added well before 2.6.32, our baseline kernel.

PR-URL: https://github.com/libuv/libuv/pull/2665
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2020-02-04 16:36:59 +01:00
Ben Noordhuis
dfd64933d5 linux: simplify uv__async_eventfd()
Assume the presence of the eventfd2() system call on Linux. It was added
in 2.6.27 and our baseline is 2.6.32.

PR-URL: https://github.com/libuv/libuv/pull/2665
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2020-02-04 16:36:59 +01:00
Ben Noordhuis
1b92af1343 unix: fix error handling in uv__make_pipe()
This commit checks that setting the close-on-exec and non-blocking flags
on the file descriptors succeeds, and closes the file descriptors when
it fails.

PR-URL: https://github.com/libuv/libuv/pull/2665
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2020-02-04 16:36:59 +01:00
Ben Noordhuis
233490819c freebsd,linux: simplify uv__make_pipe()
Assume the presence of the pipe2() system call. It was added
in FreeBSD 10 and Linux 2.6.27.

PR-URL: https://github.com/libuv/libuv/pull/2665
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2020-02-04 16:36:59 +01:00
Ben Noordhuis
06616db362 unix: fix error handling in uv__make_socketpair()
This commit checks that setting the close-on-exec flag on the file
descriptors succeeds, and closes the file descriptors when it fails.

PR-URL: https://github.com/libuv/libuv/pull/2665
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2020-02-04 16:36:59 +01:00
Ben Noordhuis
ab6fc15a16 freebsd,linux: simplify uv__make_socketpair()
Assume the presence of the SOCK_CLOEXEC flag. It was added in FreeBSD 10
and before Linux 2.6.32.

PR-URL: https://github.com/libuv/libuv/pull/2665
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2020-02-04 16:36:59 +01:00
Ben Noordhuis
0574343b31 linux: simplify uv__dup2_cloexec()
Assume the presence of the dup3() system call on Linux. It was added
in 2.6.27 and our baseline is 2.6.32.

PR-URL: https://github.com/libuv/libuv/pull/2665
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2020-02-04 16:36:59 +01:00
Ben Noordhuis
13e5b0cf49 linux: assume presence of SOCK_CLOEXEC flag
PR-URL: https://github.com/libuv/libuv/pull/2665
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2020-02-04 16:36:59 +01:00
Ben Noordhuis
067473ed5c linux: simplify uv__accept()
Assume the presence of the accept4() system call on Linux. It was added
in 2.6.28 and our baseline is 2.6.32. That lets us get rid of the system
call wrapper and the fallback logic in uv__accept().

PR-URL: https://github.com/libuv/libuv/pull/2665
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2020-02-04 16:36:59 +01:00
Saúl Ibarra Corretgé
9f1a052094 unix: remove support for FreeBSD < 10
PR-URL: https://github.com/libuv/libuv/pull/2663
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2020-02-04 13:55:29 +01:00
Isabella Muerte
018363a163 build,cmake: improve buil experience
* Add two policies to reduce "regex" if statements
* Add CMAKE_MODULE_PATH for custom CMake modules
* Remove hard-coded C89 flag
* C compiler extensions are enabled via CMake
* The C standard minimum of C90 is now required (As C89 was never an
  international standard)
* CMAKE_C_VISIBILITY_PRESET is now used to set symbols to hidden
  instead of a hard-coded compiler flag
* Add (unused) LIBUV_BUILD_BENCH option
  This will allow #1886 to be implemented in a later commit
* Add compiler flag checks for gcc-style warnings
  This allows more compilers to be used with the same compiler settings
* Move uv_test_sources to be under the LIBUV_BUILD_TESTS check
  This clears up a lot of CMakeLists.txt file to allow us to work on the
  "core" of the project. We will eventually be able to move all the tests
  to tests/CMakeLists.txt
* Make the compiler flag checks more readable
* Fix indentation of test sources per request
* Fix target_include_directories when installing versus building
* Improve performance for unix when creating the libuv.pc.in file
* Improve performance when setting `UV_VERSION_MAJOR`
* Fix typo in lint-no-unused-parameter generator expression
* Fix clang-cl detection on newer CMake versions
* Fix targeting newer windows versions
* Fix building under Windows with Visual Studio Generator

PR-URL: https://github.com/libuv/libuv/pull/2504
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <s@saghul.net>
2020-02-04 08:30:48 +01:00
Witold Kręcicki
a629688008 pipe: disallow listening on an IPC pipe
PR-URL: https://github.com/libuv/libuv/pull/2559
Reviewed-By: Jameson Nash <vtjnash@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <s@saghul.net>
2020-01-31 11:09:16 +01:00
Santiago Gimeno
1ff8420661
test: fix fs_event_watch_dir_recursive flakiness
This test sometimes times out on `macos` because not all the expected events are
received: the create and delete events may coalesce. To avoid it, make sure
not to start deleting the files until all the create events are received.

Also, take into account in the test that a create event of the `subdir`
directory can be detected even though we start watching for the events after its
creation.

PR-URL: https://github.com/libuv/libuv/pull/2648
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jameson Nash <vtjnash@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2020-01-27 22:36:25 +01:00
Jameson Nash
16a05637ef test,udp6: fix udp_ipv6 test flakiness
We seem to be receiving unrelated network traffic from other libuv
tests. Add some debugging output, in case that happens in the future,
and filter out any messages received that we didn't send.

Fixes: https://github.com/libuv/libuv/issues/2130
Fixes: https://github.com/libuv/libuv/issues/2467
PR-URL: https://github.com/libuv/libuv/pull/2617
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
2020-01-27 14:58:56 -05:00
Xu Meng
1b045d464d
ibmi: ensure that pipe backlog is not zero
On IBMi PASE, listen(pipe_fd, backlog=0) leads to "Connection refused" error

PR-URL: https://github.com/libuv/libuv/pull/2641
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2020-01-26 17:55:34 +01:00
Xu Meng
ed1dc8537e
ibmi: skip unsupported fs test cases
On IBMi PASE, we need to skip some file permission tests for `root`.
And the file stat of symbolic links are different as well.

PR-URL: https://github.com/libuv/libuv/pull/2628
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2020-01-26 17:51:49 +01:00
ssrlive
2475296c4e
build: make code compilable for iOS on Xcode
Fixes: https://github.com/libuv/libuv/issues/2638
PR-URL: https://github.com/libuv/libuv/pull/2639
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2020-01-26 17:27:56 +01:00
David Carlier
8270add421 src: android build fix
ip_mreq_source struct are not defined in Android NDK <= 16, regardless
of the API level.

Fixes: https://github.com/libuv/libuv/issues/2633
PR-URL: https://github.com/libuv/libuv/pull/2637
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2020-01-26 17:22:26 +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
a5a6bf7052
Add SHA to ChangeLog 2020-01-23 09:20:03 -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
Anna Henningsen
02e7a78628
unix: handle uv__open_cloexec return value correctly
`uv__open_cloexec()` already returns a libuv error code in case
of failure, and not `-1` like syscalls do.

Fixes: https://github.com/nodejs/help/issues/2099
PR-URL: https://github.com/libuv/libuv/pull/2645
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jameson Nash <vtjnash@gmail.com>
2020-01-21 20:02:56 +01:00
Jameson Nash
8249bd19cf Revert "aix: replace ECONNRESET with EOF if already closed"
This reverts commit ca08b48252, for the
same reasons that it was reverted the last time it was merged.

Refs: https://github.com/libuv/libuv/pull/475
Refs: https://github.com/libuv/libuv/pull/2447
PR-URL: https://github.com/libuv/libuv/pull/2602
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
2020-01-21 12:36:11 -05:00
Jameson Nash
07ddcb3052 osx,fsevent: clear pointer when deleting it [NFCI]
Set this to NULL just before disposing it to make mistakes more
painfully obvious, hopefully.

PR-URL: https://github.com/libuv/libuv/pull/2626
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2020-01-21 12:29:20 -05:00
Jameson Nash
c8a3f5c93c osx,fsevent: fix race during uv_loop_close
The mutex also needs to protect the access to the state->loop variable,
since that's owned by the child thread and will be destroyed as soon as
it processes our message.

Fixes: https://github.com/libuv/libuv/issues/2625
PR-URL: https://github.com/libuv/libuv/pull/2626
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
2020-01-21 12:29:20 -05:00
Xu Meng
c68111759d ibmi: implement uv_interface_addresses()
On IBMi PASE we need to call Qp2getifaddrs() to get the network
interface configurations. And to call QDCRLIND to get the physical
addresses.

PR-URL: https://github.com/libuv/libuv/pull/2614
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2020-01-21 09:32:11 +01:00
Ben Noordhuis
6e3e422c2d darwin: stop calling SetApplicationIsDaemon()
It's been reported that calling this function causes the Core Graphics
framework to start reporting bogus values.

Commit 565cdd16 ('Revert "darwin: speed up uv_set_process_title()"')
attempted to fix this but apparently merely postponed the moment
when `CGDisplayPixelsWide()` and friends start reporting bogus values.

The Chromium code base mentions that calling `SetApplicationIsDaemon()`
prevents the HIServices framework from terminating the process when it
can't connect to launchservicesd.

Libuv itself doesn't use HIServices but it's possible that the libuv
user does. If said user doesn't call `SetApplicationIsDaemon()`, it's
possible this commit introduces an observable change in behavior.

The `SetApplicationIsDaemon()` call was introduced in commit 08e0e63f
("darwin: avoid calling GetCurrentProcess") from October 2013 to work
around a bug in macos 10.9 where the Activity Monitor showed the program
as "Not responding."

Fixes: https://github.com/libuv/libuv/issues/2566 (for real, hopefully)
Fixes: https://github.com/nodejs/node/issues/31328
PR-URL: https://github.com/libuv/libuv/pull/2593
Refs: https://cs.chromium.org/chromium/src/sandbox/mac/system_services.cc?l=26&rcl=a06d2fe5a279ddecd358d919d461080e2c53c92e
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2020-01-21 09:25:49 +01:00
Jameson Nash
64e5a65bc9 test: avoid truncating output lines
If the output data contained a null byte (for example, because it was
really utf16), we'd truncate the output there. This commonly would
manifest as the output on the CI bot being:

> not ok 308 - threadpool_cancel_random
> # exit code 3
> # Output from process :
> # A

Now we'll attempt to print out the whole error message as text (albeit
with the wrong encoding, but the ascii content should still nearly
always be readable).

PR-URL: https://github.com/libuv/libuv/pull/2611
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2020-01-16 17:46:31 -05:00
cjihrig
6d9e89be8b
test: fix env-vars flakiness
It has been observed that running the tests via shell script
can cause special environment variables to be missing. This
commit ensures that a special Windows environment variable is set.

Fixes: https://github.com/libuv/libuv/issues/2622
PR-URL: https://github.com/libuv/libuv/pull/2624
Reviewed-By: Jameson Nash <vtjnash@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2020-01-13 20:48:55 -05:00
Jameson Nash
a740889e70 misc: adjust stalebot deadlines
PR-URL: https://github.com/libuv/libuv/pull/2498
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2020-01-13 12:07:16 -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
9eff868308
Add SHA to ChangeLog 2020-01-12 18:33:21 -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
Jameson Nash
1399d851b1
tty,unix: avoid affecting controlling TTY
Since this re-open logic is supposed to be transparent to the parent
program, this flag helps ensure that there are no unintended
side-effects. This flag is already the default (and only possible
option) on FreeBSD. Normally, Linux will also act as if you passed
NOCTTY. However, it appears that mac OS sometimes strips the parent
process of its controlling terminal if you don't pass this flag.

Fixes: https://github.com/libuv/libuv/issues/973
Fixes: https://github.com/JuliaLang/julia/issues/16398
PR-URL: https://github.com/libuv/libuv/pull/2619
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2020-01-12 17:40:13 -05:00
Ben Noordhuis
22ebdc5c35
test: fix fs birth time test failure
The test checks that the creation time equals the birth time on systems
that support the notion of birth time (macOS, Linux.)

The test was flaky because there was a write taking place between the
creation of the file and the fstat() call, sometimes changing the ctime
by fractions of milliseconds... First fstat(), only then write().

Fixes: https://github.com/libuv/libuv/issues/2235
PR-URL: https://github.com/libuv/libuv/pull/2621
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jameson Nash <vtjnash@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
2020-01-12 17:36:08 -05:00
Ben Noordhuis
c7f99c7ba5 build: turn on -fno-common to catch regressions
Refs: https://github.com/libuv/libuv/issues/2603
PR-URL: https://github.com/libuv/libuv/pull/2604
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Jameson Nash <vtjnash@gmail.com>
2020-01-10 11:10:25 -05:00
Ben Noordhuis
d42a108583 test: fix -fno-common build errors
Fixes: https://github.com/libuv/libuv/issues/2603
PR-URL: https://github.com/libuv/libuv/pull/2604
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Jameson Nash <vtjnash@gmail.com>
2020-01-10 11:09:04 -05:00
Jameson Nash
623aa05ac7 win: remove bad assert in uv_loop_close
This assert was stronger than necessary (we assert the actual condition
later in this function). And it's vulnerable to a race condition
occurring in uv__work_done where we drain the work queue but still have
a stale message on this object.

Fixes: https://github.com/libuv/libuv/issues/2610
PR-URL: https://github.com/libuv/libuv/pull/2615
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2020-01-10 11:03:34 -05:00