From 1c605e32dd64f37bc0f0d2ef6509facda4bbea9f Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 10 Oct 2023 22:51:32 +0800 Subject: improve runcmd in remote build --- xmake/modules/private/service/remote_build/server_session.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'xmake/modules') 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() -- cgit v1.3.1