diff options
| -rw-r--r-- | xmake/core/base/os.lua | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/xmake/core/base/os.lua b/xmake/core/base/os.lua index 2f44afa38..870a98097 100644 --- a/xmake/core/base/os.lua +++ b/xmake/core/base/os.lua @@ -773,9 +773,13 @@ function os.execv(program, argv, opt) end -- wait process - local waitok, status = proc:wait(-1) - if waitok > 0 then - ok = status + if not opt.detach then + local waitok, status = proc:wait(-1) + if waitok > 0 then + ok = status + end + else + ok = 0 end -- close process |
