GitHub gets confused by the non-standard format of the LICENSE file.
Move the extra bits into the creatively named LICENSE-extra file.
Fixes: https://github.com/libuv/libuv/issues/3875
File system operations may return uid and gid values, which we may want
to pretty-print. We already have the code for getting information for
the current user, so just need to add a parameter to make it exposed for
every user. We expose information about groups in a similar manner also.
In Node.js, fs.readlink() on a non-symlink file used to throw an UNKNOWN
error on Windows. This change maps ERROR_NOT_A_REPARSE_POINT to
UV_EINVAL, so that now it throws EINVAL just like other platforms.
This is handled explicitly in `fs__readlink`, since elsewhere it might
map to EPERM instead (such as in `link`).
On Linux, CPUs can come online or go offline while uv_cpu_info() is busy
gathering data. Change uv_cpu_info() in the following ways:
1. Learn online CPUs from /proc/stat
2. Get the model name from /proc/cpuinfo when it has a matching CPU,
or default to "unknown"
3. Get speed from /sys/devices/system/cpu/cpu%u/cpufreq/scaling_cur_freq
when it exists, or default to 0
Before this commit, libuv read the speed from /proc/cpuinfo but that
reports the base frequency, not the actual frequency. My system has
two cores running permanently at 3.6 GHz but libuv thought all 12 ran
at 2.2 GHz.
Fixes: https://github.com/libuv/libuv/issues/2351
Fixes: https://github.com/libuv/libuv/issues/3858
Increase the timer interval. That hopefully ameliorates the problem of
FSEvents.framework missing events on the macOS CI buildbot.
Not really a fix, more a mitigation.
Fixes: https://github.com/libuv/libuv/issues/3862
As of recent, the fs_partial_read and fs_partial_write tests reliably
fail on that architecture.
An upgrade from Ubuntu 20.04 to 22.04 on the CI machines is suspected,
not any changes in libuv itself.
Perhaps it's possible to work around it in the tests but as Alpha is a
dead architecture, it doesn't seem worthwhile to sink time in that.
Let's remove it from the CI matrix instead.
Fixes: https://github.com/libuv/libuv/issues/3843
Return `UV_EAGAIN` on `ERROR_OPERATION_ABORTED`.
Use the correct format for `overlapped.hEvent`.
Some refactoring to always wait for the overlapped result.
Modernize tests and some improvements.
Calling uv_fs_fstat for file types other then disk type was resulting in
error on Windows while it was retrieving data on Linux. This change
enables getting fstat for pipes and character files on Windows with data
fetched being as reasonable as possible.
A simple test is also added to check this behavior on all platforms. It
uses stdin, stdout and stderr. uv_fs_fstat needs to pass with disk files
pipes and character files (eg. console).
Refs: https://github.com/nodejs/node/issues/40006
Co-authored-by: Jameson Nash <vtjnash@gmail.com>
The old Linux baseline was essentially RHEL 6 but that distro has been
out of support for two years now. Move to RHEL 7.
This commit also moves FreeBSD to tier 2 because it isn't actually
part of libuv's CI matrix, only Node's.
Fixes: https://github.com/libuv/libuv/issues/3822
The following metrics are now always recorded and available via the new
uv_metrics_info() API.
* loop_count: Number of event loop iterations.
* events: Total number of events processed by the event handler.
* events_waiting: Total number of events waiting in the event queue when
the event provider request was made.
Benchmarking has shown no noticeable impact recording these metrics.
PR-URL: https://github.com/libuv/libuv/pull/3749
Make unices and windows consistent when closing a pipe while it's
connecting so they all return `UV_ECANCELED`.
Avoid race condition between `pipe_connect_thread_proc()` and `uv_close()` when
accessing `handle->name`.
Fixes: https://github.com/libuv/libuv/issues/3578
So `WaitNamedPipe()` doesn't fail. Increase the number of clients in
`pipe_connect_multiple` so `CreateFile()` returns `ERROR_PIPE_BUSY` and
the codepath leading to `WaitNamedPipe()` is exercised.
This reverts commit 87f0765159 and
implements a work-around instead. This has been reported to be
unnecessary, and also returns the wrong answer (off by exactly 100x),
so it is not particularly useful.
This also reverts the bugfixes to the original PR:
Revert "darwin: fix iOS compilation and functionality"
This reverts commit 1addf9b88a.
Revert "macos: fix the cfdata length in uv__get_cpu_speed (#3356)"
This reverts commit 1e7074913e.
Revert "darwin: fix -Wsometimes-uninitialized warning"
This reverts commit 6085bcef8d.
Revert "macos: fix memleaks in uv__get_cpu_speed"
This reverts commit d2482ae121.
The expected behavior on failure to read this info is to report 0 (for
example
https://github.com/libuv/libuv/blob/8975c05d199558b0cc2e98f26ce33c6090d1
d7a1/src/unix/linux.c#L834), which is which was not the case before
this PR for macos.
However hw.cpufrequency sysctl seems to be missing on darwin/arm64
(Apple Silicon), so we instead hardcode a plausible value. This value
matches what the mach kernel will report when running Rosetta apps.
Fixes: https://github.com/libuv/libuv/issues/3642
Fixes: https://github.com/libuv/libuv/issues/2911
Refs: https://github.com/libuv/libuv/pull/2912
Backported thread affinity feature and related dependency commits
from master. It will add support for those APIs: uv_cpumask_size,
uv_thread_setaffinity, uv_thread_getaffinity.
The supported platforms are Linux, Freebsd, and Windows.
Empty implementations (returning UV_ENOTSUP) on non-supported platforms
(such as OS X and AIX).
In the old version of uv_pipe_open, the parent process ID is used
always. If the open pipe is used in the same process, the parent
process will be obtained incorrectly.
Now we first get the client pid and compare it with its own pid. If it
is the same, then get the server pid. If the two are the same, then the
pipe is from the same process.
Fixes: https://github.com/libuv/libuv/issues/3766
- unpoison results from linux system call wrappers
- unpoison results from stat/fstat/lstat to pacify clang 14
(fixed in later versions)
- add MSAN build option
- turn on MSAN CI build