summaryrefslogtreecommitdiffstats
path: root/Utilities/cmlibuv/src/unix
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* libuv: Avoid including macOS CoreServices header globallyBrad King2016-08-311-4/+1
| | | | | We only need the availability macros in `unix/internal.h`. We already include CoreServices where needed in implementation files.
* libuv: Always include our own header firstBrad King2016-08-311-3/+3
|
* Merge branch 'upstream-libuv' into import-libuvBrad King2016-08-3139-0/+17514
* upstream-libuv: libuv 2016-08-30 (897738b1)