summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2023-11-02 14:02:41 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2023-11-02 14:04:00 (GMT)
commitc4be9c914b045ceb91a7ac7120fc6c6422944ae5 (patch)
tree60e05ef7b295f5deea800ce05acf4e6af0c1af43 /Source
parentae84de5a0c204bbb6ad808f9bae36ef71dcc4ca1 (diff)
downloadCMake-c4be9c914b045ceb91a7ac7120fc6c6422944ae5.zip
CMake-c4be9c914b045ceb91a7ac7120fc6c6422944ae5.tar.gz
CMake-c4be9c914b045ceb91a7ac7120fc6c6422944ae5.tar.bz2
cmSystemTools::RunSingleCommand(): Pass stdin to child process
Fixes: #25383
Diffstat (limited to 'Source')
-rw-r--r--Source/cmSystemTools.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index fe421ba..f606c22 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -576,7 +576,9 @@ bool cmSystemTools::RunSingleCommand(std::vector<std::string> const& command,
cmDuration timeout, Encoding encoding)
{
cmUVProcessChainBuilder builder;
- builder.AddCommand(command);
+ builder
+ .SetExternalStream(cmUVProcessChainBuilder::Stream_INPUT, cm_fileno(stdin))
+ .AddCommand(command);
if (dir) {
builder.SetWorkingDirectory(dir);
}