summaryrefslogtreecommitdiffstats
path: root/Utilities/cmlibuv/src/unix
Commit message (Collapse)AuthorAgeFilesLines
* libuv: macos: restore use of kqueue instead of posix pollBrad King2024-06-211-2/+0
| | | | | | | | | Revert commit f54ec4e7f9 (libuv: macos: use posix poll instead of kqueue, 2024-03-31, v3.29.1~7^2) and its parent. It is not necessary after the kqueue-based implementation was fixed to reap child processes more reliably. Issue: #25839
* libuv: macos: reap child processes more reliably when using kqueueBrad King2024-06-216-29/+50
| | | | | | | Backport libuv commit `42cc412c4a` (darwin,process: feed kevent the signal to reap children, 2023-02-01, `v1.45.0~55`) from libuv PR 3893. Fixes: #25839
* libuv: macos: use posix poll instead of kqueueBrad King2024-04-011-0/+2
| | | | | | | | | Since commit 5420639a8d (cmExecuteProcessCommand: Replace cmsysProcess with cmUVProcessChain, 2023-06-01, v3.28.0-rc1~138^2~8) we've observed spurious process hangs in `uv__io_poll` waiting for `kqueue` to deliver events on macOS. Issue: #25839
* libuv: process: de-duplicate conditions for using kqueueBrad King2024-04-011-5/+1
| | | | | | Its platform-specific headers provide a dedicated indicator. Backport libuv PR 4378.
* libuv: Avoid posix_spawn on macOS < 10.8Brad King2024-03-251-3/+7
| | | | | | | | | | | | | | Since libuv commit `83efa3dd71` (Reland "macos: use posix_spawn instead of fork", 2022-03-02, v1.44.0~10), `uv_spawn` on macOS < 10.8 has been observed to cause kernel panics and/or resource exhaustion. This became particularly noticeable in CMake since commit 5420639a8d (cmExecuteProcessCommand: Replace cmsysProcess with cmUVProcessChain, 2023-06-01, v3.28.0-rc1~138^2~8). Prefer `fork` over `posix_spawn` in libuv when targeting macOS < 10.8. Fixes: #25414 Fixes: #25818 Inspired-by: Ken Cunningham <kencu@macports.org>
* libuv: win/spawn: optionally run executable paths with no file extensionBrad King2024-02-081-0/+1
| | | | | | | | Backport libuv commit `3f7191e5` (win/spawn: optionally run executable paths with no file extension, 2024-02-05, v1.48.0~8) to add the `UV_PROCESS_WINDOWS_FILE_PATH_EXACT_NAME` option we now use. Issue: #25450
* libuv: Use SIGCHLD in bootstrap modeKyle Edwards2023-08-211-1/+3
|
* libuv: Suppress clang-analyzer warningsBrad King2023-05-222-0/+10
|
* libuv: Update CMake-internal buildsystem for 1.44.2Brad King2022-09-272-0/+8
|
* Merge branch 'upstream-libuv' into update-libuvBrad King2022-09-2720-491/+1519
| | | | | * upstream-libuv: libuv 2022-07-12 (0c1fa696)
* Merge branch 'upstream-libuv' into update-libuvBrad King2022-01-1310-761/+96
| | | | | | # By libuv upstream * upstream-libuv: libuv 2022-01-13 (2fbfa035)
* libuv: Fix clang-analyzer deadcode.DeadStores warning on LinuxBrad King2021-11-171-1/+2
|
* libuv: Convert C++-style comment to C-styleBrad King2021-11-171-1/+1
|
* libuv: Update uv__fs_copy_file_range signature in cmake-bootstrap.cBrad King2021-11-171-2/+2
|
* Merge branch 'upstream-libuv' into update-libuvBrad King2021-11-1732-989/+1382
| | | | | * upstream-libuv: libuv 2021-11-09 (0f696da5)
* libuv: Build unix tcp support during CMake bootstrapBrad King2021-11-171-17/+0
| | | | | | Using the real `tcp.c` simplifies `cmake-bootstrap.c`, and its implementation doesn't seem to require any of the platform-specific definitions. Also, later it will be needed for `uv_socketpair`.
* libuv: Include BSD sys/cpuset.h only on platforms where we use itBrad King2021-09-291-2/+5
| | | | | | Since commit 43d6e5a71f (libuv: misc: add function to get CPU affinity mask size, 2017-09-06, v3.12.0-rc1~412^2~3) we include `<sys/cpuset.h>` on several BSD platforms but only use it on FreeBSD.
* libuv: Add fs_copy stub to cmake-bootstrap.cBrad King2020-09-231-0/+8
| | | | | This is now called by `uv__fs_sendfile` in `src/unix/fs.c` but we do not need that feature during CMake bootstrap.
* Merge branch 'upstream-libuv' into update-libuvBrad King2020-09-2326-441/+1106
| | | | | * upstream-libuv: libuv 2020-09-22 (ed5b42d5)
* libuv: Add proctitle and threadpool cleanup stubs to cmake-bootstrap.cBrad King2020-04-291-0/+6
| | | | | These are now called by `uv_library_shutdown` in `src/uv-common.c` but on UNIX we do not compile those features during CMake bootstrap.
* Merge branch 'upstream-libuv' into update-libuvBrad King2020-04-2915-106/+264
| | | | | * upstream-libuv: libuv 2020-04-29 (e7ebae26)
* libuv: Restore compilation on Apple i386 architectureBrad King2020-04-071-1/+1
| | | | | | | libuv upstream commit `2475296c` (build: make code compilable for iOS on Xcode, 2020-01-18, v1.35.0~47) added a `defined(TARGET_OS_IPHONE)` preprocessor condition, but `TARGET_OS_IPHONE` is always defined on Apple to either 0 or 1.
* libuv: Restore compilation with XLClang 16.1 on AIXBrad King2020-04-071-0/+6
| | | | | | | | | | | | | libuv upstream commit `4a972bf0` (aix: Fix broken cmpxchgi() XL C++ specialization., 2019-09-06, v1.32.0~5) broke compilation with this compiler. According to https://www.ibm.com/support/knowledgecenter/SSGH3R_16.1.0/com.ibm.xlcpp161.aix.doc/migrate/migrate_to_xlclang.html XLClang 16.1 for AIX does not support `__sync_val_compare_and_swap`. The documentation suggests using C++11 atomic operations instead, but this is C code. For now fall back to the non-atomic equivalent used before so we can at least compile. Add a FIXME comment for this.
* Merge branch 'upstream-libuv' into update-libuvBrad King2020-04-0641-1099/+2191
| | | | | * upstream-libuv: libuv 2020-04-06 (d21f5aea)
* libuv: Add partial port to HP-UXEarle Lowe2019-09-206-4/+48
| | | | | Port enough of libuv to HP-UX 11.31 ia64 with GCC 4.9.3 to work for CMake.
* libuv: fix compilation with macOS 10.10 SDKBrad King2019-06-191-1/+1
| | | | | | The `F_BARRIERFSYNC` constant was not added until the macOS 10.11 SDK. Hard-code its value instead. This approach is backported from upstream libuv PR 2334.
* libuv: Add uv__statx() stub to cmake-bootstrap.cKyle Edwards2019-06-181-0/+9
|
* Merge branch 'upstream-libuv' into update-libuvBrad King2019-06-1828-223/+1158
| | | | | * upstream-libuv: libuv 2019-06-10 (ee24ce90)
* libuv: fix atomic ops compilation with xlclangBrad King2019-02-251-2/+2
|
* libuv: Update CMake-internal buildsystemBrad King2019-01-171-0/+1
|
* Merge branch 'upstream-libuv' into update-libuvBrad King2019-01-1738-1354/+1019
| | | | | * upstream-libuv: libuv 2019-01-15 (f84c5e69)
* libuv: fix clang scan-build warningKyle Edwards2019-01-141-1/+1
|
* libuv: do not require PATH_MAX to be definedBrad King2018-10-011-8/+39
| | | | | | | | | | | | | | | | | Some platforms (e.g. GNU/Hurd) do not define PATH_MAX. Add a few other variants and a fallback constant. Also use alternatives where possible: * For readlink(), use lstat() to read the length of the link first. If it is not a symlink, report EINVAL before trying to allocate. If the size reports as zero, fall back one of the PATH_MAX variants. * For realpath(), POSIX 2008 allows us to pass a NULL buffer to tell it to malloc() internally. This patch was inspired by downstream patches in Debian packaging for issues 897061 and 909011. Issue: #18337
* libuv: Revert local linux/sparc64 fix now that we have upstream fixBrad King2018-05-071-1/+1
|
* Merge branch 'upstream-libuv' into update-libuvBrad King2018-05-0740-579/+732
| | | | | * upstream-libuv: libuv 2018-05-06 (bf605bd7)
* Merge topic 'ctest-libuv-linux-sparc64'Brad King2018-05-031-1/+1
|\ | | | | | | | | | | | | 1c22fdf360 libuv: linux/sparc64: use fcntl to set and clear O_NONBLOCK Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2029
| * libuv: linux/sparc64: use fcntl to set and clear O_NONBLOCKBrad King2018-05-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upstream libuv commits: * node-v0.6.0~28 (linux: use ioctl(FIONBIO) to set O_NONBLOCK, saves a syscall, 2011-10-29) * v1.11.0~11 (unix: use async-signal safe functions between fork and exec, 2016-12-12) left an asymmetry in the way O_NONBLOCK is set and cleared. Normally ioctl/FIONBIO is used for both. However, uv_spawn uses fcntl/O_NONBLOCK to clear O_NONBLOCK between fork and exec. This fails on Linux/sparc64 where setting via ioctl/FIONBIO actually sets two bits (in O_NDELAY) that cause clearing via fcntl/O_NONBLOCK to be silently ignored (though clearing via ioctl/FIONBIO or fcntl/O_NDELAY works). Since CMake commit v3.11.0-rc1~117^2 (CTest: Re-implement test process handling using libuv, 2017-12-10), CTest uses libuv. On Linux/sparc64 child processes have been started with non-blocking output pipes. This can lead to write errors or lost output from children not prepared to deal with `EAGAIN` on stdout or stderr. Fix this for now by switching libuv back to fcntl/O_NONBLOCK to set and clear O_NONBLOCK when compiled on Linux/sparc64. LibUV-Issue: 1830 Fixes: #17941
* | libuv: disable process affinity during CMake bootstrapBrad King2018-03-051-0/+10
| | | | | | | | Avoid depending on platform-specific pthread features during bootstrap.
* | libuv: unix,win: add uv_spawn option to set child CPU affinity maskBrad King2018-03-051-0/+45
| | | | | | | | | | | | | | | | Implement it on Linux, FreeBSD, and Windows for now, and fail with UV_ENOTSUP on other platforms. Backported from upstream libuv PR 1527, scheduled for inclusion in libuv 2.0.
* | libuv: misc: add function to get CPU affinity mask sizeBrad King2018-03-051-0/+12
|/ | | | | | | | Implement it on Linux, FreeBSD, and Windows for now, and return UV_ENOTSUP on other platforms. Backported from upstream libuv PR 1527, scheduled for inclusion in libuv 2.0.
* Merge branch 'upstream-libuv' into update-libuvBrad King2018-01-1931-575/+1742
| | | | | * upstream-libuv: libuv 2018-01-19 (63de1eca)
* libuv: unix: restart syscalls interrupted by our signal handlerBrad King2018-01-081-1/+6
| | | | | | | | | | BSD `signal(2)` semantics make some system calls (e.g. for `write`) restartable when interrupted by a signal handler. Use `SA_RESTART` to enable these semantics everywhere that supports them. This is required by C++ stream libraries that interpret `EINTR` as any other error, set `badbit`, and stop writing. I've observed this with `libstdc++` during a `std::cout.flush()` call interrupted by `SIGCHLD`.
* bootstrap: Make libuv available during bootstrapBrad King2017-09-176-9/+183
| | | | | | | On UNIX, build only the parts of libuv we need for the filesystem, process, and poll abstractions using the POSIX poll() backend. This avoids many platform-specific conditions. On Windows, build all of libuv; there are no conditional alternatives anyway.
* Merge branch 'upstream-libuv' into update-libuvBrad King2017-05-2616-96/+651
| | | | | * upstream-libuv: libuv 2017-05-25 (dc596109)
* Merge branch 'upstream-libuv' into update-libuvBrad King2017-05-1521-578/+611
| | | | | | | * upstream-libuv: libuv 2017-05-09 (e11dcd43) Fixes: #16878
* libuv: Implement mkdtemp on Solaris 10Brad King2017-02-261-1/+11
|
* libuv: automatically skip ifaddrs on Solaris 10Brad King2017-02-261-0/+4
|
* Merge branch 'upstream-libuv' into update-libuvBrad King2017-02-2217-96/+1431
| | | | | * upstream-libuv: libuv 2017-02-21 (52ae8264)
* Merge branch 'upstream-libuv' into update-libuvBrad King2016-09-291-4/+13
| | | | | * upstream-libuv: libuv 2016-09-27 (8221f9b3)
* libuv: Simplify variable initializations to satisfy Clang scan-buildBrad King2016-09-012-10/+4
| | | | | The Clang scan-build tool warns about assignments whose values are never used, so initialize local variables at declaration instead.