diff options
| author | ruki <[email protected]> | 2023-10-10 22:51:32 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-10-10 22:51:32 +0800 |
| commit | 1c605e32dd64f37bc0f0d2ef6509facda4bbea9f (patch) | |
| tree | 7d4888c64ec13de2120153f6181a4633b837c865 | |
| parent | e319b5ec950686345a366939b2e92f799f41a283 (diff) | |
improve runcmd in remote build
| -rw-r--r-- | xmake/modules/private/service/remote_build/server_session.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/xmake/modules/private/service/remote_build/server_session.lua b/xmake/modules/private/service/remote_build/server_session.lua index a9347c0c4..365f343f9 100644 --- a/xmake/modules/private/service/remote_build/server_session.lua +++ b/xmake/modules/private/service/remote_build/server_session.lua @@ -259,8 +259,11 @@ function server_session:runcmd(respmsg) if os.isfile(path.join(self:xmake_sourcedir(), "core", "main.lua")) then xmakesrc = self:xmake_sourcedir() end - os.execv(program, argv, {curdir = self:sourcedir(), stdout = stdout_wpipe, stderr = stdout_wpipe, stdin = stdin_rpipe, - envs = {XMAKE_IN_SERVICE = "true", XMAKE_PROGRAM_DIR = xmakesrc}}) + try { function () + os.execv(program, argv, {curdir = self:sourcedir(), + stdout = stdout_wpipe, stderr = stdout_wpipe, stdin = stdin_rpipe, + envs = {XMAKE_IN_SERVICE = "true", XMAKE_PROGRAM_DIR = xmakesrc}}) + end} stdin_rpipe:close() stdout_wpipe:close() |
