diff options
author | Brad King <brad.king@kitware.com> | 2018-11-15 13:03:57 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-11-15 13:08:56 (GMT) |
commit | 86e8315482fd8f0bba85af6f4f8363ead6a0818d (patch) | |
tree | bfe834ba2f4f8a613e757c1e775777430063b085 /Source | |
parent | bdec3bd896b6faabab1c7cae79d8e75e8d0f0e41 (diff) | |
download | CMake-86e8315482fd8f0bba85af6f4f8363ead6a0818d.zip CMake-86e8315482fd8f0bba85af6f4f8363ead6a0818d.tar.gz CMake-86e8315482fd8f0bba85af6f4f8363ead6a0818d.tar.bz2 |
CTest: Restore inheritance of stdin by test processes
Since commit v3.11.0-rc1~117^2 (CTest: Re-implement test process
handling using libuv, 2017-12-10) we do not give the child test
processes any stdin. Prior to that change we let the child test
processes inherit stdin from ctest itself. Tests that run serially
might be able to use the real stdin meaningfully, so restore that
behavior and add a test case.
Fixes: #18591
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CTest/cmProcess.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/CTest/cmProcess.cxx b/Source/CTest/cmProcess.cxx index 39cea87..c4cf046 100644 --- a/Source/CTest/cmProcess.cxx +++ b/Source/CTest/cmProcess.cxx @@ -127,7 +127,8 @@ bool cmProcess::StartProcess(uv_loop_t& loop, std::vector<size_t>* affinity) uv_pipe_open(pipe_writer, fds[1]); uv_stdio_container_t stdio[3]; - stdio[0].flags = UV_IGNORE; + stdio[0].flags = UV_INHERIT_FD; + stdio[0].data.fd = 0; stdio[1].flags = UV_INHERIT_STREAM; stdio[1].data.stream = pipe_writer; stdio[2] = stdio[1]; |