diff options
| author | ruki <[email protected]> | 2020-02-05 00:34:53 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-02-07 22:45:56 +0800 |
| commit | 94d3eb649e489a597a2f5d966d2249a9e64d87e3 (patch) | |
| tree | c5bb5c3286c64a5ca491b2aacc0c09a4c9cc84ba /xmake/core/base/os.lua | |
| parent | a615d353a701e0d23e322060e5dd8e364d38dfee (diff) | |
impl private.async.runjobs
Diffstat (limited to 'xmake/core/base/os.lua')
| -rw-r--r-- | xmake/core/base/os.lua | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/xmake/core/base/os.lua b/xmake/core/base/os.lua index 46a0ad1a1..35099cc9e 100644 --- a/xmake/core/base/os.lua +++ b/xmake/core/base/os.lua @@ -659,29 +659,7 @@ function os.execv(program, argv, opt) if proc ~= nil then -- wait process - local waitok = -1 - local status = -1 - if coroutine.running() then - - -- save the current directory - local curdir = os.curdir() - - -- wait it - repeat - -- poll it - waitok, status = proc:wait(0) - if waitok == 0 then - waitok, status = coroutine.yield(proc) - end - until waitok ~= 0 - - -- resume the current directory - os.cd(curdir) - else - waitok, status = proc:wait(-1) - end - - -- get status + local waitok, status = proc:wait(-1) if waitok > 0 then ok = status end |
