summaryrefslogtreecommitdiff
path: root/xmake/core/base/os.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2019-08-17 11:04:25 +0800
committerruki <[email protected]>2019-08-17 11:04:25 +0800
commit45a548d4329975c113ac0f225f98afcf5f2b0724 (patch)
treeb38458c965b21ce78eee5bc04f9019cd375a350c /xmake/core/base/os.lua
parent1de49ce846981a065ce3bea73591b797718ae993 (diff)
improve process
Diffstat (limited to 'xmake/core/base/os.lua')
-rw-r--r--xmake/core/base/os.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/xmake/core/base/os.lua b/xmake/core/base/os.lua
index 18dc682da..81d7eb3ec 100644
--- a/xmake/core/base/os.lua
+++ b/xmake/core/base/os.lua
@@ -28,6 +28,7 @@ local path = require("base/path")
local table = require("base/table")
local utils = require("base/utils")
local string = require("base/string")
+local process = require("base/process")
-- save original interfaces
os._uid = os._uid or os.uid
@@ -640,7 +641,7 @@ function os.execv(program, argv, opt)
-- wait it
repeat
-- poll it
- waitok, status = process.wait(proc, 0)
+ waitok, status = proc:wait(0)
if waitok == 0 then
waitok, status = coroutine.yield(proc)
end
@@ -649,7 +650,7 @@ function os.execv(program, argv, opt)
-- resume the current directory
os.cd(curdir)
else
- waitok, status = process.wait(proc, -1)
+ waitok, status = proc:wait(-1)
end
-- get status
@@ -658,7 +659,7 @@ function os.execv(program, argv, opt)
end
-- close process
- process.close(proc)
+ proc:close()
end
-- ok?