summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/core/base/process.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/xmake/core/base/process.lua b/xmake/core/base/process.lua
index 3102da184..0541f98c6 100644
--- a/xmake/core/base/process.lua
+++ b/xmake/core/base/process.lua
@@ -140,6 +140,20 @@ end
-- end
--
function process.waitlist(proclist, timeout)
+ local procs = {}
+ for _, proc in ipairs(proclist) do
+ table.insert(procs, proc._PROC)
+ end
+ local count, list = process._waitlist(procs, timeout)
+ if count > 0 and list then
+ for _, procinfo in ipairs(list) do
+ local proc = procinfo[1]
+ local index = procinfo[2]
+ procinfo[1] = proclist[index]
+ assert(proc == procinfo[1]._PROC)
+ end
+ end
+ return count, list
end
-- async run task and echo waiting info