summaryrefslogtreecommitdiff
path: root/xmake/core/base/winos.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2022-11-25 22:52:30 +0800
committerruki <[email protected]>2022-11-25 22:52:30 +0800
commit6aea0d82f240f27d500ee16701eb8d253533cf16 (patch)
tree25dc076978067f5b40875c1a0d6069a666caf06f /xmake/core/base/winos.lua
parent4b3232ce7d067f5ec760b80c16978f261918ffe1 (diff)
improve to run cl.exe
Diffstat (limited to 'xmake/core/base/winos.lua')
-rw-r--r--xmake/core/base/winos.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/xmake/core/base/winos.lua b/xmake/core/base/winos.lua
index f8b45288a..b0ea7331d 100644
--- a/xmake/core/base/winos.lua
+++ b/xmake/core/base/winos.lua
@@ -359,5 +359,17 @@ function winos.registry_values(keypath)
end
end
+-- inherit handles in CreateProcess safely?
+-- https://github.com/xmake-io/xmake/issues/2902#issuecomment-1326934902
+--
+function winos.inherit_handles_safely()
+ local inherit_handles_safely = winos._INHERIT_HANDLES_SAFELY
+ if inherit_handles_safely == nil then
+ inherit_handles_safely = winos.version():ge("win7") or false
+ winos._INHERIT_HANDLES_SAFELY = inherit_handles_safely
+ end
+ return inherit_handles_safely
+end
+
-- return module: winos
return winos