From 5ea6ff34f63326c6769ee249b1b30bb8553e7c52 Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 16 Apr 2022 20:46:57 +0800 Subject: fix os.execv --- xmake/core/base/os.lua | 10 +++++++--- 1 file 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 -- cgit v1.3.1