diff options
author | Brad King <brad.king@kitware.com> | 2024-06-14 13:26:53 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2024-06-14 13:27:04 (GMT) |
commit | 224e7b922fd3320b22b009e06a6960cca9bbee97 (patch) | |
tree | 4c0a3194dcb342603e378e34580188f636ccb71c | |
parent | 646a81fec784eb726d80e86cc26c021abec1a212 (diff) | |
parent | e4d0169107b6359946997b06bbc2cdd4f119bf16 (diff) | |
download | CMake-224e7b922fd3320b22b009e06a6960cca9bbee97.zip CMake-224e7b922fd3320b22b009e06a6960cca9bbee97.tar.gz CMake-224e7b922fd3320b22b009e06a6960cca9bbee97.tar.bz2 |
Merge topic 'ctest-windows-std-handles' into release-3.30
e4d0169107 ctest: Fix spurious build failures with CTEST_USE_LAUNCHERS on Windows
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9598
-rw-r--r-- | Source/cmSystemTools.cxx | 27 | ||||
-rw-r--r-- | Source/cmSystemTools.h | 6 | ||||
-rw-r--r-- | Source/ctest.cxx | 1 |
3 files changed, 0 insertions, 34 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 964bac1..093a18b 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -2429,33 +2429,6 @@ void cmSystemTools::EnsureStdPipes() } #endif -void cmSystemTools::DoNotInheritStdPipes() -{ -#ifdef _WIN32 - // Check to see if we are attached to a console - // if so, then do not stop the inherited pipes - // or stdout and stderr will not show up in dos - // shell windows - CONSOLE_SCREEN_BUFFER_INFO hOutInfo; - HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE); - if (GetConsoleScreenBufferInfo(hOut, &hOutInfo)) { - return; - } - { - HANDLE out = GetStdHandle(STD_OUTPUT_HANDLE); - DuplicateHandle(GetCurrentProcess(), out, GetCurrentProcess(), &out, 0, - FALSE, DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE); - SetStdHandle(STD_OUTPUT_HANDLE, out); - } - { - HANDLE out = GetStdHandle(STD_ERROR_HANDLE); - DuplicateHandle(GetCurrentProcess(), out, GetCurrentProcess(), &out, 0, - FALSE, DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE); - SetStdHandle(STD_ERROR_HANDLE, out); - } -#endif -} - #ifdef _WIN32 # ifndef CRYPT_SILENT # define CRYPT_SILENT 0x40 /* Not defined by VS 6 version of header. */ diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h index 7e33e58..d12ab07 100644 --- a/Source/cmSystemTools.h +++ b/Source/cmSystemTools.h @@ -505,12 +505,6 @@ public: const std::vector<std::string>& files, cmTarExtractTimestamps extractTimestamps, bool verbose); - // This should be called first thing in main - // it will keep child processes from inheriting the - // stdin and stdout of this process. This is important - // if you want to be able to kill child processes and - // not get stuck waiting for all the output on the pipes. - static void DoNotInheritStdPipes(); static void EnsureStdPipes(); diff --git a/Source/ctest.cxx b/Source/ctest.cxx index f6a11b4..68c36df 100644 --- a/Source/ctest.cxx +++ b/Source/ctest.cxx @@ -177,7 +177,6 @@ int main(int argc, char const* const* argv) argc = encoding_args.argc(); argv = encoding_args.argv(); - cmSystemTools::DoNotInheritStdPipes(); cmSystemTools::InitializeLibUV(); cmSystemTools::FindCMakeResources(argv[0]); |