CMake/Utilities
Brad King 1c22fdf360 libuv: linux/sparc64: use fcntl to set and clear O_NONBLOCK
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
2018-05-02 11:16:19 -04:00
..
cmbzip2 bzip2: Drop unused .dsp files 2017-08-30 06:56:49 -04:00
cmcompress Rename header guards to not start with double underscore 2014-12-11 13:53:06 -05:00
cmcurl Merge branch 'upstream-curl' into update-curl 2018-01-24 14:18:16 -05:00
cmexpat expat: Update CMake build for 2.2.3 2017-08-07 10:22:13 -04:00
cmjsoncpp jsoncpp: Drop doxygen comments not recognized by Clang 2017-08-30 10:17:21 -04:00
cmlibarchive libarchive: Do not use nanosecond file time APIs on macOS < 10.13 2017-09-20 11:28:40 -04:00
cmliblzma liblzma: Fix HAVE_INLINE and HAVE___INLINE checks 2017-05-17 15:00:16 -04:00
cmlibrhash Merge topic 'librhash-left-shift-unsigned' 2016-11-29 08:58:59 -05:00
cmlibuv libuv: linux/sparc64: use fcntl to set and clear O_NONBLOCK 2018-05-02 11:16:19 -04:00
cmvssetup VS: Port Visual Studio Setup third-party header to older VS versions 2017-01-11 09:45:05 -05:00
cmzlib zlib: Disable warnings to avoid changing 3rd party code 2015-01-14 09:20:27 -05:00
Doxygen Require CMake 3.1 to build CMake itself 2017-08-10 15:08:02 -04:00
Git Add pre-commit hook to check whether SetupForDevelopment must re-run 2017-01-31 11:16:10 -05:00
GitSetup Merge branch 'upstream-GitSetup' into update-gitsetup 2017-11-30 14:55:34 -05:00
IWYU IWYU: Add more workaround mappings for internal bits 2018-01-22 09:56:30 -05:00
KWIML Merge branch 'upstream-KWIML' into update-kwiml 2018-01-09 08:51:59 -05:00
Release CMake 3.11.0-rc1 version update 2018-02-05 11:16:50 -05:00
Scripts curl: Update script to get curl 7.58.0 2018-01-24 14:14:04 -05:00
Sphinx Require CMake 3.1 to build CMake itself 2017-08-10 15:08:02 -04:00
.clang-tidy clang-tidy: add option CMake_RUN_CLANG_TIDY 2017-05-04 17:39:23 +02:00
.gitattributes clang-format.bash: Use Git attributes to mark files for formatting 2017-02-22 16:59:26 -05:00
.NoDartCoverage ENH: No need to do coverage of utilities 2005-06-14 15:53:10 -04:00
cm_bzlib.h Simplify CMake per-source license notices 2016-09-27 15:14:44 -04:00
cm_curl.h Simplify CMake per-source license notices 2016-09-27 15:14:44 -04:00
cm_expat.h Simplify CMake per-source license notices 2016-09-27 15:14:44 -04:00
cm_jsoncpp_reader.h Simplify CMake per-source license notices 2016-09-27 15:14:44 -04:00
cm_jsoncpp_value.h Simplify CMake per-source license notices 2016-09-27 15:14:44 -04:00
cm_jsoncpp_writer.h Simplify CMake per-source license notices 2016-09-27 15:14:44 -04:00
cm_kwiml.h Simplify CMake per-source license notices 2016-09-27 15:14:44 -04:00
cm_libarchive.h Simplify CMake per-source license notices 2016-09-27 15:14:44 -04:00
cm_lzma.h Simplify CMake per-source license notices 2016-09-27 15:14:44 -04:00
cm_rhash.h Add option to build CMake against a system librhash 2016-11-10 08:29:38 -05:00
cm_uv.h Simplify CMake per-source license notices 2016-09-27 15:14:44 -04:00
cm_xmlrpc.h Simplify CMake per-source license notices 2016-09-27 15:14:44 -04:00
cm_zlib.h Simplify CMake per-source license notices 2016-09-27 15:14:44 -04:00
CMakeLists.txt clang-tidy: add option CMake_RUN_CLANG_TIDY 2017-05-04 17:39:23 +02:00
cmThirdParty.h.in Add option to build CMake against a system librhash 2016-11-10 08:29:38 -05:00
SetupForDevelopment.sh SetupForDevelopment: Drop cmake.org remote repo configuration 2017-03-03 13:31:49 -05:00