diff options
| author | ruki <[email protected]> | 2019-08-18 20:46:50 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-08-18 20:47:21 +0800 |
| commit | 35e6c625a2279a9c6adfdba1027b27d088b3c8b6 (patch) | |
| tree | 1ee4f7e1d6bf40a445225571fbb699ae79ee9de6 /xmake/core/sandbox/modules/process.lua | |
| parent | eb6a3e93dae0deaa411f88a06ea9c46d75b501dc (diff) | |
improve to open filelock and process
Diffstat (limited to 'xmake/core/sandbox/modules/process.lua')
| -rw-r--r-- | xmake/core/sandbox/modules/process.lua | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/xmake/core/sandbox/modules/process.lua b/xmake/core/sandbox/modules/process.lua index 7bfb8ef5d..6fbcaf40b 100644 --- a/xmake/core/sandbox/modules/process.lua +++ b/xmake/core/sandbox/modules/process.lua @@ -67,13 +67,10 @@ function sandbox_process.open(command, opt) -- hook subprocess interfaces local hooked = {} - for name, func in pairs(proc) do + for name, func in pairs(sandbox_process_subprocess) do if not name:startswith("_") and type(func) == "function" then - local newfunc = sandbox_process_subprocess[name] - if newfunc ~= nil then - hooked["_" .. name] = proc["_" .. name] or func - hooked[name] = newfunc - end + hooked["_" .. name] = proc["_" .. name] or proc[name] + hooked[name] = func end end for name, func in pairs(hooked) do @@ -104,13 +101,10 @@ function sandbox_process.openv(filename, argv, opt) -- hook subprocess interfaces local hooked = {} - for name, func in pairs(proc) do + for name, func in pairs(sandbox_process_subprocess) do if not name:startswith("_") and type(func) == "function" then - local newfunc = sandbox_process_subprocess[name] - if newfunc ~= nil then - hooked["_" .. name] = proc["_" .. name] or func - hooked[name] = newfunc - end + hooked["_" .. name] = proc["_" .. name] or proc[name] + hooked[name] = func end end for name, func in pairs(hooked) do |
